I have two forms in my app and both seem to be having issues.
Form 1 is a simple edit form. The button to submit that form checks to see if the form is valid and if it is it toggles from disabled to edit using this code:
If(FRM_CampaignForm.Valid, DisplayMode.Edit,DisplayMode.Disabled)
For some reason, even though all the required fields are completed, the button does not go into edit mode. How do I find where/how the form is invalid?
Form 2. This form lives on a screen with a gallery. It is in view mode when entering the screen. There is an edit button that puts the form into edit mode. Along with this button I also have a submit button to submit any changes made to the form. That button is also disabled until a change happens with the form. My issue is that when I click the edit button the button is already in edit mode. How do I find what is triggering this? The code on the button is below.
If(
FRM_CampaignReview.Unsaved,
DisplayMode.Edit,
DisplayMode.Disabled
)
Finally figured out the solution to my form problem. I have a custom data card that has an HTML text box. In this box I am concatenating multiple values from various combo and text boxes. I wasn't seeing any errors pop but after making a few changes, which brought back the error messages, I noticed that this data card was throwing an error. The data in that HTML text box was exceeding 100 characters. The fix was to simply increase the number of characters the column in the table would allow. Always turns out to be something simple.
Since I was able to figure out and answer the problem with the second form I am marking that one as the solution and opened a new post here regarding the first one which is very baffling.
Ok. One other discovery with the first form and the dependent combo box. The form validates only for one combination. None of the other combinations work. I've even added some additional combinations to the Dataverse table and it is still just the one combination that works.
The second form was definitely the formatting. I was taking the integer stored in the table and converting it to look like currency and then putting that in the field. Should have thought of that earlier.
With the first form the problem seems to be a combo box that is dependent. I can't figure out exactly why. Some times when I make a selection the form is valid and other selections it is not. And sometimes, it will be valid and flip invalid.
Yes. I've done that. I get a true/false response but that doesn't tell where in the form the problem is. I'm trying to figure out why the one form is considered invalid if all the required controls are populated and why the other form is appearing as being changed when all I did was switch from.......Hmmm. That second one I have an idea why. I added some formatting to the text entered into one of the text fields. I'll need to test to see if that is the case.
The first one is still a bit of a mystery.
I would add a label on the Form and enter FRM_CampaignForm as the text. Then as you use the App you should be able to see the value change and check if the value is what you expect.
---------------------------------------------------
Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.
Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
Regards
Darren Lutchner - 365 Assist
WarrenBelz
146,651
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional