Hi all,
My older version code uses executesqlQuery to execute a SQL code and it returns dictionary value . They used the rule in main interface to save the values to local variables. Now the function is deprecated and we replace it with executeStoredProcedureForQuery to execute SQL and it returns Map structure. But we are getting error while saving that in the main interface.
This is the error we are getting. I have changed the index value as the new structure but still I am getting error. Anyone have idea about how to resolve that?
Thanks,
Kavya
Discussion posts and replies are publicly visible
Can you share the affected code snippet?
Hi Stefan,
I can't able to share my code, It was marking as spam.
A screenshot?
Initially the sub rule gives map structure , Now I used a!toJson and a!fromJson to convert that to dictionary format. Still the error happens at save function.
Can you try to use proper keyword syntax like below.
a!save( target: local!something, value: rule!something() )
there you have a!saves() and local variable declaration in a saveinto?
any deeper sense, which I might miss for this kind of {}-structure in the saving logic?
small hint:you dont need the if at line 530. just rule!apn_isblank is enough.in line 522 you don't need the and()
Unknown said:there you have a!saves() and local variable declaration in a saveinto?
Yes, this will cause the issue. The local variable declarations in saveInto should also be wrapped in a!save() instead, such as here:
And here:
You can replicate this error by trying this in a simple interface:
a!localVariables( local!buttonVal, a!buttonLayout( primaryButtons: { a!buttonWidget( label: "Save", saveInto: { a!save(local!buttonVal,"test"), local!test: a!map(id: 1) /* This line is not correct! */ } ) } ) )
To add to the thread this error also will occur for the situation where you have a rule input defined as an expression, not a variable. Such as an a!save(ri!value,"test"), where the input definition in the user input task is something like a string "value here", vs a variable such as pv!value.
this looks familiar, lol...
Mike Schmitt said:this looks familiar, lol...
Ha, oops! But I agree!