cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bitvrbit
Helper I
Helper I

Hide button based on 4 input text fields

Hide button based on 4 input text fields.                                     

This is the formula that is inserted button / property / visible:

If(And(!IsBlank(Firmanavn.Text),!IsBlank(Adresse.Text),!IsBlank(Postalkode.Text), !IsBlank(Cvrnr.Text)),true,false)

But I'm getting syntax error.
Thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @ bitvrbit:

Do you want the button control to be visible when all four of these TextInput controls are not empty?

I did the same test but didn't encounter the problem you said:

Set the button’s visible property to:

 

If(And(!IsBlank(Firmanavn.Text);!IsBlank(Adresse.Text);!IsBlank(Postalkode.Text);!IsBlank(Cvrnr.Text));true;false)    /* Same as your code*/

 

 

1.jpg

 

To find the problem, I suggest you check the following two points:

1\The name of your Text Input control: Did you quote them correctly in the formula?

2\ In some region, ; represent ,;;, represent ;,maybe you can try:

 

If(And(!IsBlank(Firmanavn.Text);!IsBlank(Adresse.Text);!IsBlank(Postalkode.Text);!IsBlank(Cvrnr.Text));true;false)

 

In addition, I think

 

 And(!IsBlank(Firmanavn.Text),!IsBlank(Adresse.Text),!IsBlank(Postalkode.Text), !IsBlank(Cvrnr.Text))

 

 is enough. For brevity, there is no need to use "if"

 

Best Regards,

Bof

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @ bitvrbit:

Do you want the button control to be visible when all four of these TextInput controls are not empty?

I did the same test but didn't encounter the problem you said:

Set the button’s visible property to:

 

If(And(!IsBlank(Firmanavn.Text);!IsBlank(Adresse.Text);!IsBlank(Postalkode.Text);!IsBlank(Cvrnr.Text));true;false)    /* Same as your code*/

 

 

1.jpg

 

To find the problem, I suggest you check the following two points:

1\The name of your Text Input control: Did you quote them correctly in the formula?

2\ In some region, ; represent ,;;, represent ;,maybe you can try:

 

If(And(!IsBlank(Firmanavn.Text);!IsBlank(Adresse.Text);!IsBlank(Postalkode.Text);!IsBlank(Cvrnr.Text));true;false)

 

In addition, I think

 

 And(!IsBlank(Firmanavn.Text),!IsBlank(Adresse.Text),!IsBlank(Postalkode.Text), !IsBlank(Cvrnr.Text))

 

 is enough. For brevity, there is no need to use "if"

 

Best Regards,

Bof

View solution in original post

 Thank you very much v-bofeng-msft  thank you .you don't know how much time I have lost for this function. I gladly accept info for syntax for beginners. ciao ciao 🙂

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,277)