Automatically populate a user ID created by flow designer in to a variable with reference field?

priyanka chodip
Tera Contributor

Hi,
I created a flow designer which creates a user record and there is a variable called ID(Reference field) on catalog item which gets populated on RITM.
now after the workflow approvals the user record gets created (through flow designer) and that created user records user id should be populated in variable called ID as mentioned above.so i created a an action - (update catalog variables) in flow designer and placed data pills in the fields as required(attached the screenshot). but the user ID is not getting populated.
can anyone help me through this.
Thank you.

1 ACCEPTED SOLUTION

So, you are seeing the "Name" of the user that is created because that would be the display value for records on the sys_user table, and that is what a reference field would show as the value. 

I take it that your requirement is to show the user_name of the newly created record?

You can't change the display value on the sys_user table for just one use-case, and you can't display a different display value on a specific field, so you have a couple of options.

You could change your ID variable on the catalog item to be a lookup select box, reference to sys_user, and set the label field to be the user_name field, and the value field to be the sys_id field and try again with sys_id. That's what I'd do - it lets you display the user_name but the value of the field is still the sys_id of the record, so you can more easily reference the user record if you need to. 

Otherwise, you could make the ID field on your catalog item a string field - then I think your data-pill for user id would work. If you just need the string value for the user id, this might work for you. 

I hope this helps!

If this was helpful, or correct, please be kind and mark the answer appropriately.

Michael Jones - Proud member of the GlideFast Consulting Team!

 

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

View solution in original post

4 REPLIES 4

Michael Jones -
Giga Sage

There are a few things to check. 

If you hard code a value for ID (not use a data pill) and run the flow, does the RITM variable get properly updated? (validate that your action can, indeed, update the variable value). 

You mention that the variable is a reference field - I assume to sys_user? You need to make sure that you are passing in the sys_id of the new record from Create Record, not the user_name field, in order to set the reference properly. 

Lastly, when you check the executions of the flow, make sure you are seeing the expected value for "variable value". 

I hope this helps!

If this was helpful, or correct, please be kind and mark the answer appropriately.

Michael Jones - Proud member of the GlideFast Consulting Team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

Hi Michael,

i tested by giving sys_id of the new record from created record, in this case the ID variable is getting populated with name of user record instead of user ID.
and if i test by giving datapill of user ID of created record. no value is getting displayed, just blank in the variable called ID.
is there any way to overcome this.
if yes, Please help me with it.

thanks & Regards
Priyanka.

So, you are seeing the "Name" of the user that is created because that would be the display value for records on the sys_user table, and that is what a reference field would show as the value. 

I take it that your requirement is to show the user_name of the newly created record?

You can't change the display value on the sys_user table for just one use-case, and you can't display a different display value on a specific field, so you have a couple of options.

You could change your ID variable on the catalog item to be a lookup select box, reference to sys_user, and set the label field to be the user_name field, and the value field to be the sys_id field and try again with sys_id. That's what I'd do - it lets you display the user_name but the value of the field is still the sys_id of the record, so you can more easily reference the user record if you need to. 

Otherwise, you could make the ID field on your catalog item a string field - then I think your data-pill for user id would work. If you just need the string value for the user id, this might work for you. 

I hope this helps!

If this was helpful, or correct, please be kind and mark the answer appropriately.

Michael Jones - Proud member of the GlideFast Consulting Team!

 

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

Hi,
that really helps, thank you.
is there anyway to get the subsysid of business service table in to a variable through flow designer.