Hello again Appian community,
I am trying to figure out why or how I am getting this error
this is my code:
with( local!icon:rule!GFIM_get2525D_AirEntities(), a!dropdownField( label: "Icon", labelPosition: "JUSTIFIED", placeholder: "--- Select a Value ---", choiceLabels:a!forEach( items: local!icon, expression:fv!item.entity&" - "&fv!item.entityType&" - "&fv!item.entitySubtype, ) , choiceValues:a!forEach( items: local!icon, expression:fv!item.code, ) , value: if( rule!APN_isEmpty(ri!Symbol.icon), "110101", tostring(ri!Symbol.icon) ), saveInto: ri!Symbol.icon, searchDisplay: "AUTO", showWhen: { or(local!milsymbol = 3, local!milsymbol = 4) }, validations: {} ), ),
it is working for all of my other drop-downs except this one the only difference is that I am using the for each in the drop-down,
but I do not know what I am doing wrong
can you not add a for each loop to a dropdown?
thanks, Kevin
Discussion posts and replies are publicly visible
The values in choiceValues and value must match in type and value. As value is a string, I think wrapping the foreach in line 12 into a touniformstring() should help.
thanks for the reply ,
sadly that did not work,
I do not understand the error message, why is it saying that the value is true?
thank you for your time.
Dropdown can be tricky. As I said, type and value must match. What is the value of ri!Symbol.icon?
thank you!!! , I was using the wrong variable.
wow that took me way to long, thank you for helping out