Skip to main content
April 29, 2024
Question

Weird save behavior {"Apple","Banana"} to null

  • April 29, 2024
  • 8 replies
  • 0 views

Hi.

I was setting up some save functionality for the one spot in my code that saves to a particular variable.

I had a rule that outputs null under certain conditions, but kept watching it show up as {null} instead.

I have tried to simplify the issue and have found saving into the localvariable something like {"Apple", "Banana"} results in straight null instead. 

What is happening in my interface?

If i save the same value to a random debug variable it works fine.

8 replies

mathieud0001
Brainy
April 30, 2024

Care to share some code?

April 30, 2024

Originally there was just project_mou_status and its description.  We had a new requirement come in for sub statuses to be given as choosable based on the description.  

It has been a pain but I managed to get all the logic down for mapping to these.  Everything in the rules works fine.  Just this local variable below seems to be tainted in some way permanently. 

local!projectMouSubStatuses:if(a!isNullOrEmpty(local!projectMOU.statusId),
null,
a!forEach(
local!projectMouStatuses,
if(tointeger(fv!item.projectMouStatusId)=local!projectMOU.statusId,
fv!item.subStatus,
{}
))),

csteward
April 30, 2024

As you note that saving this value to a dummy variable works fine, is the value of local!projectMouSubStatuses also fine in the expression?  As this would be the same scenario, unless local!projectMouSubStatuses is becoming manipulated elsewhere.

How is this local variable getting to the output of the expression rule, is the result just the variable itself or is there further logic?

The case where saving {"Apple", "Banana"} also becomes null is interesting, and leads me to think the value is manipulated further along in the code..

konduruc733182
April 30, 2024

Hello [mention:49374b54369b49908aa64ddf00e81cf9:e9ed411860ed4f2ba0265705b8793d05] 

Please share your code snippet and screenshots .