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

DrewW
Mega Sage

Have you tried setting the value to the string "NULL"?

ymmt
Tera Contributor

Thanks, DrewW!

 

I tried to set "NULL" in the string, but it had no effect.

 

In step 5 of the attached image, I set "NULL" in Togle Scripting for the flow variable User.
After that, I put the value of the flow variable into the Message of the log output action, and it seems that the value is not lost and I am able to get the User ID.
*Incidentally, when I tried "return NULL;" instead of a string, I got a ""NULL" is not defined" error.

 

If I am doing something wrong, I would appreciate a hint.

 

Thank you in advance.

In a script did you try and return an empty string?

ymmt
Tera Contributor

Thanks, DrewW.

 

Sorry for the delay in replying.

 

I tried the following in Toggle Scripting, but none of them worked

  • return;
  • return "";
  • return NULL;
  • return "NULL";
  • return null;
  • return "null";
  • return undefined;
  • return "undefined";

We also tried the same pattern as return with the following statement, which also had no effect.

  • fd_data.flow_var.group = "null";

Thank you in advance.