Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi, I;ve done this before but forgot how. I would like a field reuired before submitting the data. How can I do this?
Thanks
Solved! Go to Solution.
Hi,
The issue with your current code is that both If statements execute independently. This means that even if one of the fields is blank, the success message may still display. You need to check both conditions at the same time before displaying the success message.
try this updated code, this is Power Fx:
If(
IsBlank(DateValue1) || IsBlank(DataCardValue16),
Notify("Please fill in all required fields.", NotificationType.Error),
Notify("Form submitted successfully!", NotificationType.Success)
)
Hi @Sonyat810 ,
Check out this update code:
If(
IsBlank(DateValue1) || IsBlank(DataCardValue16),
Notify("Please fill in all required fields.", NotificationType.Error),
SubmitForm(EditForm1);
Notify("Form submitted successfully!", NotificationType.Success)
)
Hi @Sonyat810 ,
What is the context? please give more details of what you need to do!
It's the date and a textbox.
I figured it out. Thanks
Happy you find the solution, please consider to accept the relevant reply as solution
Just one more question. The fields are requited to True, but it still says "Success" without letting them know they are missing required fields.
Sorry @Sonyat810 ,
But i still need the context, if possible shar pictures of what you're facing and of what you desire.
Thank you
Hi,
The issue with your current code is that both If statements execute independently. This means that even if one of the fields is blank, the success message may still display. You need to check both conditions at the same time before displaying the success message.
try this updated code, this is Power Fx:
If(
IsBlank(DateValue1) || IsBlank(DataCardValue16),
Notify("Please fill in all required fields.", NotificationType.Error),
Notify("Form submitted successfully!", NotificationType.Success)
)
I figured it out. Thank you once again.
Yes, that is the code I have, bur it isn't writing to my sharePoint list. I addes SubmitForm, before the IF staements and it now submits to SharePoint list, But doesn't show an error message if the reuired fields are not filled in, it just says success, without writing to the list
Even though the form says submitted successfully, it still asking for required fields. I can I give and error message where people aren't confused:
Can you tell me what I am missing in my code you gave which works great! Only thing is its still saying submitted successfully when it's not. It's suppose to Please fill all reuired fields
Hi @Sonyat810 ,
Check out this update code:
If(
IsBlank(DateValue1) || IsBlank(DataCardValue16),
Notify("Please fill in all required fields.", NotificationType.Error),
SubmitForm(EditForm1);
Notify("Form submitted successfully!", NotificationType.Success)
)
That got rid of the errors but form wasn't submitted
Got it working. Thanks for your help! Very Helpful and kind.
I'm still gettng an error with the commas, I add the & operator
| User | Count |
|---|---|
| 52 | |
| 41 | |
| 32 | |
| 15 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 72 | |
| 37 | |
| 27 | |
| 24 |