I want to erase the set value of a Reference type flow variable in Flow Designer.

ymmt
Tera Contributor

Thanks for taking a look.

 

I would like to erase the value set for a flow variable of type Reference in Flow Designer so that nothing is set.

To date, I have tried the following methods, none of which have worked.

 

(1) I tried to erase the set values by leaving the data field blank in "Set Flow Variables" in Flow Logic.
(2) In "Set Flow Variables" of Flow Logic, I tried to overwrite the set value with undefined by setting "return undefined;" to "Togle Scripting".

 

If the flow variable was a string type flow variable, I could set it to "undefined" by the method (2), but I could not achieve this with the Reference type flow variable.

 

Please let me know if you can shed any light on this.

 

Thank you in advance.

11 REPLIES 11

MDAQUIBK
Tera Contributor

@ymmt  Was this issue resolved ? Are you able to update to empty ?

Not sure if you ever found a solution but I finally got this to work in Flow Designer with a Reference field that references the sys_user table. Not sure it works with all Reference fields but worth the try.


Used the code: 

var emptyVal = "(empty)";
return emptyVal;


empty string.jpg

 



Does work for other references.

Also when are you setting the variable?  How is it getting set the first time?  Is this a subflow and you are trying to change the value of one of the inputs?

 

ymmt
Tera Contributor

Thanks, DrewW.

Currently, we are testing the operation with a very simple flow.

 

test_flow_config.png

Thank you in advance.