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.