Since you are using Data Grid 2, you could also use Dynamic Text or Custom Content as column option.
In here you can use the following expression or something quite similar:
Use replaceall function like ReplaceAll($iteratoruserrole/name,'_',' ') in DS microflow of the list view.
Hi Corina Lopez,
You may use this below logic to get userrole name. I the create variable use $iteratoruserrole/name.
After getting the role name you may use replace function to achieve your requirement.
As Davy Heutmekers said, you can use the DataGrid2 column configuration to setup a dynamic text from an expression where you replace the underscore, this is how:
Open the DataGrid2 settings, then open the Role column’s settings, set the Role Column’s Show attribute to “Dynamic Text”, this will unhide additional fields where you can add dynamic text using an expression. Click on the “Edit...” next to the “Dynamic Text” field, and there enter your replaceAll expression.
Hi, there are some best answers already given for this.
- What I also see is, in your screen shot, you have account object and you wanted to change the role name
- But you should understand that, one account can have multiple user roles
- So, first you must get the user roles of the account as a list and then change the role name within loop
Just in case if none of the above suggestions works for your case, you can also try the following. Although I am not sure what you are trying to do:
- Have a DS microflow on the data grid
- Within the DS microflow, create a non-persistent entity
- This non-persistent entity can have an attribute called user role and the role name can be changed with ReplaceAll method, as already mentioned in the above comments.
Again, there can be lot of approach for a problem. But it depends on what you wanted to achieve.
thank you all for you collective help! i’ve learned so much.
here is what i ended up doing:
since i have multiple custom content columns that all use the data source “account, by xpath” and when i tried to change one it changed them all, i kept that the same.
but i added a list object inside of the column in which i used a microflow to use the account as a parameter, retrieve the list of user roles and cast the list.
inside the text object of the list i added the replaceAll expression that was mentioned above.
again, thank you all for helping me learn this!