Hi all - I'm having trouble with the User Picker field to populate a rule input with a specific user. I'm able to search and select a user. it shows for a split second then goes blank again. When run in Design Mode, it does populate my rI! field, but at runtime, just shows then goes away. What am I missing?
Discussion posts and replies are publicly visible
Hi, I think your value is not getting saved. Can you check your value and saveInto parameter of the picker field? If possible try to print the value on ui and see whether your selected value is getting saved or not. It also happens when you use sub interfaces and rule inputs are not mapped properly between parent and child interface.
Right, it's not getting saved. When I test in Design Mode, it does save to the rule input, just not a runtime. I tried creating the ri as a text datatype and also as User datatype. And both as an array and not array. Regardless, shows saved in Design, but not at runtime.
I AM able to save it to a local variable, (which shows the user name as an array with the UserIdentifier), but not sure how to get from localV to RI. The local DOES save and stay populated runtime.
What does runtime mean in your case? Rule inputs must be backed by task or process variables. Did you check this?
Eventually yes, this is a task processing interface and the value of the selected user will be passed to a process variable to re-assign the current task. But for now, just to figure it out, I'm using this empty interface in my user step of the process, with just this single user picker button. Hmmmm, let me see if it has something to do with the pv mapping.
YES, that was it. In my attempt to simplify the issue down to the bare bones, I neglected to setup the process variable to hold the selected value. Thank you for asking about my runtime usage!
Just to bottom this out (as it's a common conceptual hurdle for many folk) - rule inputs (on interfaces or rules) are not variables in their own right, they are pointers to variables. It just happens that in a Designer Appian helpful spins up some variables for you to allow you to test your object in isolation. At run-time if those rule inputs are not mapped to actual variables (local!, ac!) then any value you select into those rule inputs will "disappear".