Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Sonyat810
Helper III
Helper III

How to make a felid required

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

2 ACCEPTED SOLUTIONS

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)
)

 

View solution in original post

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)
)

View solution in original post

17 REPLIES 17
Bibiano_Geraldo
Super User
Super User

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 

Sonyat810_0-1738328460417.png

 

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:

Sonyat810_0-1738330090008.png

SubmitForm(EditForm1);
If(
    IsBlank(DateValue1) || IsBlank(DataCardValue16),
    Notify("Please fill in all required fields.", NotificationType.Error),
    Notify("Form submitted successfully!", NotificationType.Success)
)

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

 

SubmitForm(EditForm1);
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)
)

That got rid of the errors but form wasn't submitted

Got it working. Thanks for your help! Very Helpful and kind.

Happy it works @Sonyat810 ,

feel free to ask if you face any issue.

 

Thank you

I'm still gettng an error with the commas, I add the & operator

 

Sonyat810_1-1738328839242.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.