Hi,
You're on the right track with your If condition, but you'll indeed need to use a variable to control the visibility of the dialog based on both the condition and the close button. Here's how you can do it:
Create a variable:
On the OnStart property of your app, initialize a variable (like varShowDialog) and set it to false. This variable will be used to control the visibility of the dialog box.
Set(varShowDialog, false)
Check the Amount:
On the OnChange property of your DisAmountUSD text input control, you can check whether the entered value is more than 250. If it is, set varShowDialog to true.
If(Value(DisAmountUSD.Text) > 250, Set(varShowDialog, true))
Set Visibility of Dialog:
Now, you can set the Visible property of your dialog to varShowDialog. This will make the dialog box appear when varShowDialog is true.
Close the Dialog:
On the OnSelect property of your close button, set varShowDialog to false. This will hide the dialog box when the close button is clicked.
Set(varShowDialog, false)
So in summary, whenever a value is entered into DisAmountUSD, the condition will check if it's greater than 250. If it is, varShowDialog is set to true and the dialog box appears. When the close button is clicked, varShowDialog is set to false and the dialog box disappears.
Hope this helps! Let me know if you have any other questions.