Hi All,
I am getting below error while trying to bind formatted json data from one interface to another interface to bind with in the Appian grid.
Please let me know if any clarification required.
Please find the code sampleInterfaceOne:-local!jsonData: if( a!isNullOrEmpty(ri!jsonData), {}, a!fromJson(ri!jsonData) ),local!exceptionResults:property(local!jsonData, "ScreeningSummary", null),
if(a!isNotNullOrEmpty(local!exceptionResults), rule!PM_ScreeningExceptionSummary(a!toJson(local!exceptionResults)), {}), InterfaceTwo:-a!localVariables( local!exceptionResultsFound: if( a!isNullOrEmpty(ri!exceptionResults), {}, a!fromJson(ri!exceptionResults) ), { a!sectionLayout( label: "Exceptions", labelSize: "SMALL", labelColor: cons!CORE_BRANDING_LABEL_COLOR, contents: { a!gridField( data: local!exceptionResultsFound, emptyGridMessage: cons!CORE_NO_DATA_MESSAGE, columns: { a!gridColumn( label: "Screening Services", value: fv!row.ScreeningService ), a!gridColumn( label: "Exception Found", value: fv!row.ExceptionMessage ) }, ) }, isCollapsible: true, divider: "BELOW", dividerWeight: "THIN", dividerColor: "#dddddd" ), })
Discussion posts and replies are publicly visible
Hm ... when you create an interface that requires data from the outside world, add a rule input of the desired type and pass that data when calling it.
This might help: appian.rocks/.../
Thanks for your replied.Yes I have used rule input and type is Text. Please find the highlighted code.if(a!isNotNullOrEmpty(local!exceptionResults), rule!PM_ScreeningExceptionSummary(a!toJson(local!exceptionResults)), {}), This is the InterfaceTwo and passing parameter as rule input.rule!PM_ScreeningExceptionSummary(a!toJson(local!exceptionResults))
Is there a specific reason for this JSON magic? Why not just use a map?
Does this interface have more than one rule input? In any way, it is a best practice to always pass values using keyword syntax.
This seems to pretty complicated. Did you try to reduce this to a much simpler test case? This way, you can work out the principals and grow from there.
Hi Stefan Helzle,Our data always coming as a Json data. The InterfaceTwo having only one rule input. As per the requirement , the InterfaceTwo can be use multiple Place.
Can you please share any code sample if in your hand? So that i can try base on your example.
I shared the link to my blog post above. That should explain how passing data to interfaces works.
Regarding the JSON, I highly recommend to parse it into a map ASAP, and then pass that map around.