I have 2 columns code1 and code2. Code1 text is set to allow only numbers and code2 is set to allow only text for instance. code1 is hidden and code2 is visible when choice selected value is Yes. But the form is not submitting the form without values on both code1 and code2 , though code1 is hidden.
Please help.
Thanks
Solved! Go to Solution.
Here is what I would do. There are 3 places to make changes. What these will do is disable your submit button if the choice is No and code2 is blank. It will clear code2 if the choice is Yes and the warning label will be displayed if the choice is No and code2 is blank.
In the choice OnSelect:
If(Self.Selected.Value = "Yes", Reset(code2))
In the Warning Label Visible: Note you can set whatever criteria you need here, to include matching functions if code2 needs to match specific criteria like length or type of characters.
If(
ChoiceControl.Value = "No" && IsBlank(Code2.Text), true,
false
)
In the DisplayMode for your submit button:
If(
WarningLabel.Visible, DisplayMode.Disabled, DisplayMode.Edit
)
Try adding an If statement to your validation formula. Something like this
If(
Self.Visible, validation code here, ""
)
@GMRaju3 If the column is set to required in your datasource you can't change this behavior in powerapps.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thank you for the reply. Sorry , Can you please let me know at which property as this is with the sharepoint custom form with many validations. Here is the sample replica at a test list.
Thank you for the reply. Yes, Definitely not required fields.
@GMRaju3 When you go to SharePoint --> List Settings you will see a list of all fields for that list. Could you provide a screenshot for this?
Sure. Plz find attached.
@GMRaju3 OK. So this looks good. Nothing should prevent you to submit the Form even if Code and/or Code2 has no value.
Do you get an error message? Could you make your Code2 DataCard visible...do you see any errors? When you submit the form (with Code2 visible)...does it save?
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
If there is validation for the text and the text doesn't 'match' the validation because it's blank, it won't save.
Sorry, I need to validate code2 textbox, if the choice value is No, before saving the form and stop save action in case not validated. The code2 text field needs to be blank or set to blank value if the choice value is Yes.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
182 | |
52 | |
41 | |
39 | |
33 |
User | Count |
---|---|
247 | |
80 | |
71 | |
70 | |
66 |