Skip to main content
Inspiring
August 1, 2020
Answered

app.alert help

  • August 1, 2020
  • 2 replies
  • 6413 views

I have field1 and field 2, on field 1 I have app.alert to limit me from entering specific value from field 2 even though field 1
doesn't calculate that value when alert pop it
still change value in field2. What I need to do so when I get alert that field2 stay same and doesn't change it's current value?

This topic has been closed for replies.
Correct answer ls_rbls

Sorry but it's not working for me as intended. All I need is if I get app.alert from field1 after entering value in field2, field2 need to return to it's previous value before app.alert.


Then modify my custom calculation script above for Field2 like this:

 

if (event.value <= 30) {
this.getField("Field1").value = event.value;
}  else {

if (event.value > 30) { event.value = this.getField("Field1").value;
 }
}

 

Don't change anything. Try it out first as instructed.

 

In the solution I am giving to you  the app alert is not executed in Field1. If you have any calutlations or app.alert scripts in Field1 get rid of it. Or we will continue like the chicken or the egg story of what came first.

 

Everything will run from Field2 in this example.

2 replies

ls_rbls
Community Expert
Community Expert
August 4, 2020
Asim123Author
Inspiring
August 4, 2020

Sorry I don't see how those posts could help me?

ls_rbls
Community Expert
Community Expert
August 5, 2020

You asked about a popup alert.

 

The the structure of the scripts in those two discussions  is what I was trying to share with you as examples.

 

It shows how an alert is triggered based on a condition when a value changes in another field.

 

Isn't that what you're struggling with?

 

 

Legend
August 1, 2020

Please share your code or your file. 

Asim123Author
Inspiring
August 1, 2020

I don't have code for field2.

in field1 is just simple calculation nothing more, app.alert comes from "field value is in range".

Just need help if alert pop, field2 also stay same, because now even though field1 doesn't change it's value if alert pop entered value in field2 stay in it.

Legend
August 1, 2020

Please give us the actual code you already have. Please copy and paste it. Also please post your idea for the new code, even if wrong. We hope to help you learn how to write your code, not to just write it all for you.