Hello together,
so we have a canvas app which is connected to our Dynamics365 System. Now we want to be able to edit Opportunites in the Canvas App. We have two fields called "Expected Revenue p.a." and "Est. Transactions p.a." both fields have a requirement in Dynamics365 to have a Value over 5000 (expected revenue) and over 150 Transactions. The problem in the canvas app is, that the canvas app, doesnt regonice those requirements and you can just safe the opportunity with less then the requirements.
Now I tried to that in the canvas app. So for the fields I was able to create a error message, when the field Value is less then the requirement. I dont know if this was the best way, if you found a better way, i´m open for your input
Now I want to disable the Submit button if one or both of those fields doesnt have the requirements in it. If I do it for one field it is working. I just type in the Displaymode: If(Value(DataCardValue11.Text)<5000;DisplayMode.Disabled;Displaymode.Edit)
but if I want both fields to be required, it just wont work. I tried it like this:
If(Value(DataCardValue11.Text)<5000 And Value(DataCardValue7.Text)<150;DisplayMode.Disabled;DisplayMode.Edit)
and like this
If((Value(DataCardValue7.Text)<150) And (Value(DataCardValue11.Text)<150);DisplayMode.Disabled;DisplayMode.Edit)
Can you tell me, why it just doesnt work? It only takes the first requirement, the second one is just ignored
Thank you very much
Best Regards
Daniel
Solved! Go to Solution.
Turn your logic around and you should be fine. You want the submit button to be enabled only when both thresholds are met.
If(Value(DataCardValue11.Text)>5000 And Value(DataCardValue7.Text)>150;DisplayMode.Edit;DisplayMode.Disabled)
Turn your logic around and you should be fine. You want the submit button to be enabled only when both thresholds are met.
If(Value(DataCardValue11.Text)>5000 And Value(DataCardValue7.Text)>150;DisplayMode.Edit;DisplayMode.Disabled)
Wow that was easy.. thank you very much 🙂
One more question. The Error Messages that are in the Form for every field. They pop up when a required field isnt filled out. Is it possible the have the same Error Message, when the Value isnt the requirement? Because I would like to have the error Message right under the field, where something is missing
Like here, when it is saying, that the type is missing
There is no simple way to change where the error messages display. For that you would need to create a label for each field with the visible property set based on whether that field had an error or not.