Hello Guys,
I am having a code which will generate a rating icon based on the input integer. So far its working fine, When I try to make the input as a array by click on the checkbox and gave 2 more input rating there shows an error.
The first picture is the error one and the second one is the rating output when it is given a single input value, Thanks in Advance.
Discussion posts and replies are publicly visible
When you pass a list into your code in line 8, it creates a list. Putting a list into an if(), creates multiple outputs. a!richtextIcon does not understand multiple items.
Any suggestions to solve this?
Could you please help me.
Depends on what you want to achieve. If you want to show multiple star-ratings and have a richtextfield for each, then wrap the field into a foreach iterating on the rule input.
Its throwing an error.
fv!item.rating does not exist.
Add another a!localVariables in line 4, wrapping the rich text field, and create a local!rating. In line 12, replace fv!item.rating by local!rating.
docs.appian.com/.../fnc_looping_a_foreach.html
Thank you it works. But when I try to incorporate that in the interface, I am facing error.
I need to get the average of all the reviews. I get the values when I check it separately but when I put together its throwing error.
The codes snap of the rules in line 112.
The error message "cannot index property ..." means that there is no field with that name in the data. Could it be that there are no ratings for the second book?
Use the index() or property() function to access fields in data structures in a save way.
Thanks Stef that helps!