Pre-populate a custom field before the action.

ronini
Tera Contributor

I created a service catalog using flow designer. The requirement was to have a label the approver type per approval level. The logic is there will be 5 layers of approval dependent from multiple tables. So what i did is to create a custom field in the sysapproval_approver table and I was able to achieve this by look up and update record action in flow designer and the field is updated after the approval state is on APPROVED state, however the customer wants the Approver type to be pre-populated while the approval request is sent out and the state is Requested. Any suggestion how i can achieve this? I'm exploring the custom action functionality however i can't seem to make it work. Help please. thanks!  

4 REPLIES 4

Namita_Snow
Tera Expert

@ronini ,

you can use "do the following in parallel" action, in the first stage add Ask for Approval action (add some unique values in Journal Field which you can for lookup record in second stage) and in second stage add a timer for 1 min, Look up record on approval table (for lookup try to add conditions such as Journal Field value which you set in first stage and Approving field is RITM record)  and update the approver type field.

I did this but somehow a different RITM is being updated with the custom field i created. when i add the data pill for the ritm, it stops the WF. 

Ankur Bawiskar
Tera Patron
Tera Patron

@ronini 

the logic where you have written after approval, can't you move it to before insert?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

I tried this too, the approval wf stops.