Issue with update record action in Flow designer

Anil Pathi
Tera Contributor

Hi

 

I have requirement to update record in Calculated Application Service table with the help of catalog item variables. I am using flow designer to achieve this requirement. There are total 8 variables in catalog form and same fields available in table also. My requirement here is, If catalog variable has value then I need to update that field in record or If catalog variable is empty I need to leave it as it is. I used update record action flow designer in below manner. It is working for the variables that has value, If variable value is empty, this empty is getting populated in record.

AnilPathi_0-1695664257466.png

And I m using below script in Script Toggle.

 

if(fd_data._1__get_catalog_variables.owned_by!=''){
return fd_data._1__get_catalog_variables.owned_by;
}

 

1 REPLY 1

Jitendra Kumar1
Tera Expert

Hi @Anil Pathi ,

 

Follow this steps :

  1. In your Flow Designer, after the "Update Record" action, add a "Decision" or "Conditional Branch" step to evaluate whether the catalog item variable has a value or not.

  2. In the condition of the Decision step, you can use the "Is Empty" condition to check if the catalog item variable is empty.
    If the condition is true (i.e., the catalog variable is empty), you can skip the update action for that specific field. To do this, you can simply connect the "No" branch of the Decision step to the next step in your flow without performing any updates.

  3. If the condition is false (i.e., the catalog variable has a value), you can continue with the "Update Record" action for that specific field.