Flow Designer - copy string to reference field.

hongsok
Tera Contributor

Hello all,

 

I create a flow to copy a request number (string) from a custom table to a reference field on the User [sys_user] table and it is not working. 

hongsok_0-1693314294274.png

hongsok_1-1693314374863.png

Regards,

Hong

 

 

6 REPLIES 6

Sai Kumar B
Mega Sage
Mega Sage

@hongsok 

This happens because of data type mismatch, You can only set the string data in string fields. To set reference fields you need sys_id of the reference table record.

For example, The string number can only be stored in any of the string field available in user table.

If I could help you with my response you can mark it as helpful and correct as it benefits future viewers
Thanks,
Sai Kumar B
Community Rising Star 2023 & 2022

Mohith Devatte
Tera Sage
Tera Sage

Hello @hongsok 

You need to pass the sys_id the record in order to populate the reference field.

But you are passing a string value to a reference field where there is a data type mismatch which is not populating your data.

Try passing sys_id of the record you want to populate in your request number field

Hope this helps

Mark the answer correct if this helps you 

Thanks

hongsok
Tera Contributor

Hi @Mohith Devatte ,

 

What do you mean "passing sys_id"?

@hongsok sys_id is a unique number which is a 32 bit auto generated unique key  for every record in your instance.

 

So if am not wrong your request number field is a reference field  referring to some X table. But your have number with you from trigger data.

so you need to write a script to glide record to your request number table and query with number and if there is a matching record found return the sys_id of the record.