ri!taskCode = cons!IC_TEXT_TASKCODE_RESERVE_NO_FOREWARD,
label: "Pull Zone",
placeholderLabel: "Select a Value",
label: "Location ID",
placeholderLabel : "Select a Value",
/* rule!IC_QRY_getLocnidFromMSTLocationHeader */
operator: "is null"
batchSize: - 1,
the second dropdown field is not saving the values, whenever I select a value in dropdown it disappears. Any help would be appreciated.
Discussion posts and replies are publicly visible
Replace the value parameter of the second dropdown with this and see what happens:
In general what you have above is forcing the second dropdown to not show its value when local!pullZone is blank, however nothing from either dropdown that you've shown causes any value to be saved into local!pullzone. Maybe the if() statement should have been checking for the nullness of local!pullZoneValues instead, but I can't tell for sure based only on what you've provided.
I tried implementing the property syntax. There is no change though. I've modified the question bit more, can you please look at it and let me know.
property() works the same way as index() -- the real thrust of my change was that i removed the if() statement you had it enclosed in.
(i put in property() instead of index() in my change, because I prefer using property() when referring to a cdt property, just for code readability).
In your revised code I don't see any sign of you trying my original suggested change - i.e. you're still only showing a value in the "Location ID" column when local!pullZone is not null, but nowhere else in your posted code is saving a value into local!pullZone, so we would not expect the dropdown to show a value even if you try to set one.
Instead what I was asking for you to try should look more like this:
I did change. Once after making the change it started to threw error. Thats why I reverted.
This is the error I get when i use property
That error isn't due to property - it would be the same if you switched back from "property" to "index" (they both work the same way); the reason you're seeing this error now is because, now that the if() statement is removed from the value (which was preventing the value from showing anything at all before), the dropdown is attempting to resolve the value "00009057" against the choice values, which as the error message states, does not contain that choice.
If you edit the value of ri!selectedTask and clear out the value of "locnId", the error will probably go away.
I cleared and edited like you said and tried to select the values from pull zone again. when I select the pull zone and pick a location ID. You can see that the value is stored in rule input for the location ID. But in the column field it disappears.
I notice you've re-added the if() statement here for some reason -- so we're back to the original problem that your "isnull()" statement is checking the value of local!pullZone, which (at least in your earlier code example) never gets assigned a value. I think you may have meant to put local!pullZoneValues in that isnull(), because otherwise the second dropdown will never display any value.
If I just use index. on the very fist user interaction, im able to select the pull zone and location ID but on the next instance if i try to select a different pull zone, I started to get an error. In order to avoid that error I used the if condition.
© 2023 Appian. All rights reserved.