web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps ifblank not ...
Power Apps
Answered

PowerApps ifblank not working

(0) ShareShare
ReportReport
Posted on by 909

Hello,

 

I had a function in PowerApps:

 

SubmitForm(Form1) && SubmitForm(Form2),

ResetForm(Form1) && ResetForm(Form2),
Navigate(Screen4;Fade))

 

This function was on the button, and it was responsible for sending forms, resetting data and showing the "complete" window.

 

I would however want to change this function so it would work only if Form1 is not blank (form 1 is a sharepoint multitext  field that is required).

 

I tried to do it like that:

If(
IsBlank(Form1),
DisplayMode.Disabled,
DisplayMode.Edit
else
SubmitForm(Form1) && SubmitForm(Form2);;
ResetForm(Form1) && ResetForm(Form2);;
Navigate(Screen4;Fade)
)

 

or like that: 

 

If( ! IsBlank( Form1),
SubmitForm(Form1) && SubmitForm(Form2);;
ResetForm(Form1) && ResetForm(Form2);;
Navigate(Screen4;Fade))

 

but I am getting ParenClose... 

Could you please help me in making it work? I would love to have button greyed out if the Form1 does not have at least 1 symbol.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,458 Most Valuable Professional on at

    Hi @Elitezone ,

    IsBlank() does not apply to forms. 

    You could use the Form.Unsaved property (it is the reverse, so Form1.Unsaved=false means it has not had any input)

     

    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.

  • Elitezone Profile Picture
    909 on at

    Thank you, but it does not work.

    Am I formatting not correctly?

     

    If(Form1.Unsaved=false; DisplayMode.Disabled; DisplayMode.Edit);;
    SubmitForm(Form1) && SubmitForm(Form2);;
    ResetForm(Form1) && ResetForm(Form2);;
    Navigate(Screen4;Fade)

  • WarrenBelz Profile Picture
    156,458 Most Valuable Professional on at

    @Elitezone ,

    Yes that is formatted properly, but I admit I never use the function and have seen a number of posts where it has not worked.

    The other option you have is on the OnChanged of every control set a variable Set(vChanged,true), then use If(vChanged . . .  as your test.

     

    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.

  • Elitezone Profile Picture
    909 on at

    In the datacard in onselect i Have added Set(vChange1;true)

     

    on the next screen button I have added:

     

    If(vChange1;true);;
    SubmitForm(Form1) && SubmitForm(Form2);;
    ResetForm(Form1) && ResetForm(Form2);;
    Set(vChange1;false);;
    Navigate(Screen4;Fade)

     

    How come this still doesn't work :(?

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Elitezone 

     

    If I am understanding the requirement correctly, you have a text field in the first form which you want to check if it is empty or not. Can you try to update the expression as:

    If(!IsBlank(DataCardValue11.Text);SubmitForm(Form1);;SubmitForm(Form2);;ResetForm(Form1);;ResetForm(Form2);;Navigate(Screen4;Fade))

    OR
    If(vChange1 = true; SubmitForm(Form1);;SubmitForm(Form2);;ResetForm(Form1);;ResetForm(Form2);;Set(vChange1;false);;Navigate(Screen4;Fade))

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Elitezone Profile Picture
    909 on at

    @yashag2255  It worked! Thanks! I used first option!

    Is it possible to improve this so It will make a button Red or print additional message?

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Elitezone 

     

    Glad that it works! Yes, that is doable. You can use notifications like: 

    If(!IsBlank(DataCardValue11.Text);SubmitForm(Form1);;SubmitForm(Form2);;ResetForm(Form1);;ResetForm(Form2);;Navigate(Screen4;Fade);Notify("Message you want to display",NotificationType.Error))

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • Elitezone Profile Picture
    909 on at

    It works with one data card, but it doesn't work with more than one.

    Is this change invalid?

     

    If(!IsBlank(DataCardValue11.Text || DataCardValue10.Text) 

     

    I want it to stop when either of this datacard is blank.

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @Elitezone 

     

    In that case, can you try to update the formula as:

    If(!IsBlank(DataCardValue11.Text) && !IsBlank(DataCardValue10.Text) ;SubmitForm(Form1);;SubmitForm(Form2);;ResetForm(Form1);;ResetForm(Form2);;Navigate(Screen4;Fade);Notify("Message you want to display",NotificationType.Error))

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Elitezone Profile Picture
    909 on at

    @yashag2255 

    Ok... It is executed correctly, but I noticed that data is not uploaded into Sharepoint List.

     

    Formula is currently like that:

    If(!IsBlank(DataCardValue1.Text) && !IsBlank(DataCardValue2.Text);SubmitForm(Form1) && SubmitForm(Form2) && SubmitForm(Form3);;ResetForm(Form1);;ResetForm(Form2);; ResetForm(Form3);;Navigate(Screen4;Fade);Notify("Przed przesłaniem formularza wypełnij wszystkie pola.";NotificationType.Error))

     

    DataCardValue1.Text = New single text field.

    DataCardValue2.Text = New multi line text field.

     

    Form1 = Multi line text form

    Form2 = Attachment form

    Form 3 = Single field text + Combo (dropdown list) + Single field text (default - invisible, depending on the choice in combo)

     

    No data is saved. There are no errors.

    IsBlank is working tho - when no data is in DataCard it won't allow to send form. It will block the screen.

     

    Sometimes it appears that Name field is obligatory. But that name field is listed in Form3 (Single Field Text) - it is single line Sharepoint list that was recently added.

    I deleted sharepoint connection and added it again, but still this error persist.

     

    Name field is DataCardValue1.Text - it is in IsBlank... So it is written...

    Do you have any idea how to solve it?

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard