Hi team,
I am going through this appian tutorial Process Modeling Tutorial - Appian 21.2 but error in expenseReportSummary Interface like this "Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function 'user' [line 5]: Null argument not allowed".
i have interface
{ a!textField( label: "Requester", labelPosition: "ADJACENT", value: user(ri!expenseReport['recordType!{618f143c-4310-4256-a9c3-b96fe7161fcf}AT Expense Report.fields.{pp}pp.{initiator}initiator'], "firstName") & " " & user(ri!expenseReport['recordType!{618f143c-4310-4256-a9c3-b96fe7161fcf}AT Expense Report.fields.{pp}pp.{initiator}initiator'],"lastName") ), a!textField( label: "Amount", labelPosition: "ADJACENT", value: ri!expenseReport['recordType!{618f143c-4310-4256-a9c3-b96fe7161fcf}AT Expense Report.fields.{expenseAmount}expenseAmount'], readOnly: true ), a!textField( label: "Date", labelPosition: "ADJACENT", value: ri!expenseReport['recordType!{618f143c-4310-4256-a9c3-b96fe7161fcf}AT Expense Report.fields.{expenseDate}expenseDate'], readOnly: true )}
error in user()
Thanks,
kiran
Discussion posts and replies are publicly visible
Hi kirank,
The user() function does not allow null arguments. Hence you're getting this error. Try placing a null check for the arguments before the user() function. Also, make sure that you pass the data to the input of the interface for testing.
Sample code:
a!textField( label: "Requester", labelPosition: "ADJACENT", value: if( isnull( ri!expenseReport['recordType!{618f143c-4310-4256-a9c3-b96fe7161fcf}.fields.{pp}.{initiator}'] ), "Username is unavailable", /*Customized message*/ user( ri!expenseReport['recordType!{618f143c-4310-4256-a9c3-b96fe7161fcf}.fields.{pp}.{initiator}'], "firstName" ) & " " & user( ri!expenseReport['recordType!{618f143c-4310-4256-a9c3-b96fe7161fcf}.fields.{pp}.{initiator}'], "lastName" ) ) )