Flow designer - When I submit the request. Requested for details not populating

Challasunil
Tera Expert

When I submit the request. Requested for details not populating in RITM and Catalog tasks.

Please help me. So, my requirement is, I need to populate requested for with requested by when user doesnt provide requested for user information

Challasunil_0-1674808942606.pngChallasunil_1-1674808965669.png

 

Run script has used in work flow  to get requested for details in RITM. same I need requested for details in RITM through flow designer.

 

if(current.variables.behalf=='true')
{
current.u_recipient_name=current.variables.requested_for;
}
else if (current.variables.behalf=='false')
{
current.u_recipient_name=current.variables.requested_by;
}
// if(current.variables.requested_by.u_executive==true)
// {
// current.assignment_group.setDisplayValue(gs.getProperty('Atlas Copco IT Executive Support'));
// }
// else
// {
// current.assignment_group='01f5d746dbeee200f132bc16bf9619cc';
// }
current.update();
gs.log('AC_Service request receiced email fire');
var reqby = current.variables.requested_by;
gs.log('reqby:'+reqby+'number:'+current.number);
var reqfor = current.u_recipient_name;
gs.log('reqfor:'+reqfor+'number:'+current.number);
if(reqby==reqfor)
{
gs.log('noapproval.same:'+'number:'+current.number);
gs.eventQueue('noapproval.same', current, current.u_recipient_name);}
if(reqby!=reqfor)
{
gs.log('noapproval.diff:'+reqby+'number:'+current.number);
gs.eventQueue('noapproval.diff', current, current.u_recipient_name);
}

3 ACCEPTED SOLUTIONS

Soeren Maucher
Mega Sage

Hello @Challasunil

 

you could simply add an if condition and an "Update Record" step at the beginning of your flow. 
In the if condition you check whether the Requested for field is empty and if it is empty you can update the Requested item "Requested for" field e.g. by setting it to the "created by" value form the requested item. 

 

SoerenMaucher_0-1674811657700.png

I hope this helped. If yes, I would appreciate if you could mark this answer as "correct solution". Thank you!

Greetings,
Sören



View solution in original post

Hello  @Challasunil,

 

as I see the "Requested for" field you are using is a custom field (the technical name is starting with "u_"). I am not sure to which table it is referencing in your case. I assume it is the user, contact or consumer table. 
I think you actually have to copy the "Opened by" value instead of the "Created by", since only the "Opened by" is a reference field. The "Created by" is just a text field and therefore it does not work if you copy the value in a reference field. 

If that is not working, then the issue is most likely related to an ACL that is preventing the flow from writing in this specific field. 

Let me know if that worked. 

If you think my answers are useful, I would appreciate if you could mark my answers as helpful. 

Greetings,
Sören 

View solution in original post

Challasunil
Tera Expert

Hi @Soeren Maucher 

 

I have tried with opened by as well

So this works perfectly when this is updated by run script flow workflow(requested for is updating). but, the issue is updating with flow designer. So, I assume there shouldnt be issue with ACL.

 

Thanks

Sunil challa

 

View solution in original post

4 REPLIES 4

Soeren Maucher
Mega Sage

Hello @Challasunil

 

you could simply add an if condition and an "Update Record" step at the beginning of your flow. 
In the if condition you check whether the Requested for field is empty and if it is empty you can update the Requested item "Requested for" field e.g. by setting it to the "created by" value form the requested item. 

 

SoerenMaucher_0-1674811657700.png

I hope this helped. If yes, I would appreciate if you could mark this answer as "correct solution". Thank you!

Greetings,
Sören



Challasunil
Tera Expert

Hi @Soeren Maucher 

 

I have updated in flow as you mentioned still the requested for(u_recipient_name) field is not populating.

Challasunil_1-1674821704029.png

 

Challasunil_0-1674821623259.png

 

 

Hello  @Challasunil,

 

as I see the "Requested for" field you are using is a custom field (the technical name is starting with "u_"). I am not sure to which table it is referencing in your case. I assume it is the user, contact or consumer table. 
I think you actually have to copy the "Opened by" value instead of the "Created by", since only the "Opened by" is a reference field. The "Created by" is just a text field and therefore it does not work if you copy the value in a reference field. 

If that is not working, then the issue is most likely related to an ACL that is preventing the flow from writing in this specific field. 

Let me know if that worked. 

If you think my answers are useful, I would appreciate if you could mark my answers as helpful. 

Greetings,
Sören 

Challasunil
Tera Expert

Hi @Soeren Maucher 

 

I have tried with opened by as well

So this works perfectly when this is updated by run script flow workflow(requested for is updating). but, the issue is updating with flow designer. So, I assume there shouldnt be issue with ACL.

 

Thanks

Sunil challa