I am using Dataverse & a Canvas App. A combobox (DataCardValue125) in my form is pulling from a second dataverse table one of the columns of which is Opportunity Status ID. Allow multiple selections is turned off on the combobox.
I am trying to use an if statement in the save button for the form to check whether this combobox has a particular value in it (wholenumber 10) in order to trigger an email (prior to saving the form)
I am using the following code to check the function before building the email:
If(
Text(DataCardValue125.Selected.'Opportunity Status ID') = Text("10"),
Notify("working",ErrorSeverity.Moderate,1000));
My problem is that it doesn't work unless the form has first been saved. Any time the value 10 is selected for the first time in the combobox, if it hasn't been saved first, it won't trigger the if clause.
What code should I use to pull the value from the combobox (prior to saving the form) for comparison?