Hi @renedd78,
Based on the issue that you mentioned, do you want to calculate the value based on the Dropdown selcted?
Could you please tell me that if you populate the Dropdown box with the option of Sum and Subtraction?
Here is my scenario, please check as below.
Add a Dropdown and set Items as to:
["Sum","Subtraction"]
Set the Default property of the TextInput corresponding to calculation result as to:
If(
Dropdown2_1.Selected.Value = "Sum",
Sum(
DataCardValue24.Text,
DataCardValue25.Text
),
If(
Dropdown2_1.Selected.Value = "Subtraction" && Value(DataCardValue24.Text) >= Value(DataCardValue25.Text),
(DataCardValue24.Text) - (DataCardValue24.Text)
)
)
In addition, to prevent that the subtraction value is greater than the value in text box 1, please add a Label within and set the Text as to:
"Negative result is not allowed!"
Set the Visible as to:
If(Value(DataCardValue25.Text) > Value(DataCardValue24.Text),true,false)
Notice that DataCardValue24 represents text box 1, DataCardValue25 represents text box 2
Hope it could help you.
Regards,
Qi