Expand my Community achievements bar.

Perplexed about popups

Avatar

Level 2

I have a form that I am working on and need to control a popup that is in a repeating subform.  Everything works great with one exception.  I have a popup that appears if the value of a calculated field is "High" another for "Low" and another for "Medium", again this popup works great, no problem. What I would like to do is have the popup appear only once for each of the values.  For example, if the "Low" popup has appeared once, I don't want it to appear again if another subforms value if "Low" and so forth. 

This is the formula I am currently using.

if ((Value1.rawValue == "Select") || (Value2.rawValue == "Select"))
{
this.rawValue = null;
}
else if ((Value1.rawValue == 1) && (Value.rawValue == 1))
{
this.fontColor = "0,100,0";
xfa.host.messageBox("Some text goes here", "User Notice", 3, 1);
this.rawValue = "Low";
}
else if ((Value1.rawValue == 1) && (Value2.rawValue == 2))
{
this.fontColor = "255,128,0";
xfa.host.messageBox("Some text goes here", "User Notice", 3, 1);
this.rawValue = "Moderate";
}


Anyone have any ideas on a way to accomplish this??

Thanks,
Eagle

3 Replies

Avatar

Level 7

You could create a variable (in Form Properties) set to 0 and then when the pop-up box first appears set the variable to 1. Then in your  elseif statement add a && variable == 0. That way if they popup has already appeared it wont show again.

Avatar

Level 2

I already thought of that.  the issue is then the other two actions, font color change and rawvalue would not get set either.

Avatar

Level 7

then you could just do a nested if statement within that condition that only applies to the popup box.