Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
Hi
In Ui there was user picker field if i choose more than one (max selection is 3 ) and submit request after that in read only the selected users we are showing in summary dashboard there user want first name and last name to be displayed instead user name
Below is the logic i am using to display selected user details in text field
a!textField( label: "Requested On Behalf:", labelPosition: "ADJACENT", value: a!forEach( items: a!defaultValue(ri!MDSRequest.requestedonBehalf, {}), expression: if( a!isNullOrEmpty(fv!item), {}, if( a!isNullOrEmpty(touser(fv!item)), {}, user(touser(fv!item), "firstName") & " " & user(touser(fv!item), "lastName") ) ) ), readOnly: true, showWhen: a!isNotNullOrEmpty(ri!MDSRequest.requestedonBehalf) ) } ),
If i select two means more than one i am getting below error i selected valid users only still getting this error also before upgrade logic worked after version upgrade i am seeing this can any one suggest on this
Error Evaluating UI Expression Expression evaluation error [evaluation ID = ef19e:da996] in rule 'changerequestsection_display' (called by rule 'caserecorddashboard') at function a!forEach [line 137]: Error in a!forEach() expression during iteration 1: Expression evaluation error at function 'user' [line 145]: [InvalidUserException] (APNX-1-4198-000)
Discussion posts and replies are publicly visible
for read-only display, richTextDisplayField is the better practice.
a!richTextDisplayField( label: "Requested On Behalf:", labelPosition: "ADJACENT", value: joinarray( a!forEach( items: a!defaultValue(ri!MDSRequest.requestedonBehalf, {}), expression: if( a!isNullOrEmpty(fv!item), {}, user(fv!item, "firstName") & " " & user(fv!item, "lastName") ) ), ", " ), showWhen: a!isNotNullOrEmpty(ri!MDSRequest.requestedonBehalf) )
Seems like there is an invalid username in your list.
two users i added me and other team members we both are active only if i added two users more than one i am getting that error
tried this logic also and getting same error even though i gave valid users two users
Is your user account an admin account? Could it be that you do not have permission to see that other user?
Yes I am system admin and other two users whom i added also admins only who were part of my team if i give signle user individually i am not getting this error if i add two users then i can see this error that too observed this after version upgrade only before that there was no issue
OK. I do not have enough information to continue guessing.
If you would be a junior, I would ask how you store the list of users, are all involved variables list types, what data type do you use, do you do any transformation steps, etc.
Thank you went through code found issue and fixed