Hi all,
Is it possible to add cusomField1 to 10 into record type user ?
My first approach was adding a custom record field but user function cannot be used inside.
Any idea ?
Regards
Jean-Alain
Discussion posts and replies are publicly visible
No, it is not possible to add user customFields1..10 in User record type, AFAIK they can only be retrieved using user() function and can be updated in user settings.
Why you want to use user function in a custom record field when you can directly access any user property using rv!record[fieldName] ?
Unfortunately these fields are not present into the record provided and are not accessible using rv!record[fieldName]. It is exactly why I try to add them using calculated fields
Did you try my approach outlined above?
I'm just trying it and it work fine. Custom fields are filled using SAML. By this way, I can also use a better name for the fields.
But you mentioned that you need these custom fields in User Record Type (which is present by default). Don't know what fields are you talking about that can be accessed through user function but not from User record.
Great to hear :-) Please mark my post as the answer in case others have a similar question.
all fields customField1 to 10. Take a look on the record type, you will see that there are not present. By using the proposed solution, these fields are available trough a relation.
For information. The code I use in expression:
a!forEach( items: fn!getdistinctusers(cons!ACF_IAM_GROUP_APPLICATION_USERS), expression: { uuid: user(fv!item, "uuid"), niss: user(fv!item, "customField1"), department: user(fv!item, "customField2"), language: user(fv!item, "customField3"), kbo: user(fv!item, "customField4"), departmentNumber: user(fv!item, "customField5"), customField6: user(fv!item, "customField6"), customField7: user(fv!item, "customField7"), customField8: user(fv!item, "customField8"), customField9: user(fv!item, "customField9"), customField10: user(fv!item, "customField10"), userTypeName: user(fv!item,"userTypeName"), userTypeId:user(fv!item,"userTypeId"), created:user(fv!item,"created") } )
Hi jeanalainb0001, could u plz provide more info on how u created an expression backed record for the above? I'm having trouble with data sync when I tried to create it. Receiving the below error.
The documentation for the error is not of much help.
First I created an expression with the code that you can see above. There are any parameters in my expression but if you want to retrieve more than 1000 users, you should implement a paging mechanism. I created a dedicated record type with web service as data source and I use the previously created expression to get data.
But I think that your problem is in paging mechanism. (see Choose a Source for Your Record Type - Appian 23.1) In this case, you must take care of the rule input to return the correct set of data. You should probably iterate not on the collection but using an enumeration (enumerate(1000)) and access the users in the list using index. Something like this [(ri!page - 1) * 1000 + fv!item + 1]