cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ganesan_gowri
Helper IV
Helper IV

Disable buttons display mode

Hai,Hope you are fine.

 Have an error. Somewhere i did a mistake. Cant Identify. For "Both"  alone it works properly. but remaining  for "MATHS" and "ENGLISH" SAVE Button is always in disable mode once all the needed fields are filled. Please verify my code and rectify that.

 

Need is:

 Enable the "SAVE" button only if all the fields have been filled. i didn't use form in this screen. 

 

1) If  Dropdown .Result= "Maths" that related field i mentioned in my code what are the fields are needed. So if any of those field is not filled Save Button wants to disable otherwise enable

2) If Dropdown.Result=" English" that related field i mentioned in my code what are the fields are needed. So if any of those field is not filled Save Button wants to disable otherwise enable

3) If Dropdown.Result="Both" that related field i mentioned in my code what are the fields are needed. So if any of those field is not filled Save Button wants to disable otherwise enable

 

save1.png

 

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ganesan_gowri :

Please try this code:

If(
  !(Category_Dropdown_3.Selected.Result in ["Maths","English","Both"]),
  DisplayMode.Disabled,
  Category_Dropdown_3.Selected.Result = "Maths" && (IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result) || IsBlank(Emp_Dropdown_3.Selected.Result) || IsBlank(Ass_Dropdown_3.Selected.Result)),
  DisplayMode.Disabled,
  Category_Dropdown_3.Selected.Result = "English" && (IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result)),
  DisplayMode.Disabled,
  Category_Dropdown_3.Selected.Result = "Both" && (IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result) || IsBlank(Emp_Dropdown_3.Selected.Result) || IsBlank(Ass_Dropdown_3.Selected.Result)),
  DisplayMode.Disabled,
  DisplayMode.Edit
)

Best Regards,

Bof

View solution in original post

6 REPLIES 6
v-bofeng-msft
Community Support
Community Support

Hi @ganesan_gowri :

Do you want to make the buttons unusable when the result of Dropdown .Result is equal to "Maths"/" English"/"Both", as long as any control is empty?

My suggestion is to use parentheses to enclose the conditions connected with "||".

I did a small test to demonstrate the difference between bracketed and unbracketed.

600.gif

I suggest you try to put brackets where I marked:

1.JPG

Best Regards,

Bof

 

I have tried the way you suggest. But SAVE Button is in Edit Mode by default

If(
Category_Dropdown_3.Selected.Result = "Maths" && (IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result) || IsBlank(Emp_Dropdown_3.Selected.Result) || IsBlank(Ass_Dropdown_3.Selected.Result)),
DisplayMode.Disabled, DisplayMode.Edit)

Hi @ganesan_gowri :

Is the value of Category_Dropdown_3.Selected.Result now "Maths"? If not, it will be in Edit mode. (Because the previous conditions are not met)

Best Regards,

Bof

No what i need is i have three values in category dropdowns: "MATHS","SCIENCE","BOTH"

if (category. selected. Result="Maths") then i need to fill these dropdowns values. if any one is blank then SAVE Button wants to be in Disable mode.

 

IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result) || IsBlank(Emp_Dropdown_3.Selected.Result) || IsBlank(Ass_Dropdown_3.Selected.Result)

 

or if i select Category,dropdown.Result= "English" then i need to fill these dropdowns if any thing is not filled SAVE Botton wants to disable

 

IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result)

 

Or if category dropdown value= "Both" need to fill these dropdowns if any one of these is blank Save Button want To be disable

 

IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result) || IsBlank(Emp_Dropdown_3.Selected.Result) || IsBlank(Ass_Dropdown_3.Selected.Result)

Hi @ganesan_gowri :

Please try this code:

If(
  !(Category_Dropdown_3.Selected.Result in ["Maths","English","Both"]),
  DisplayMode.Disabled,
  Category_Dropdown_3.Selected.Result = "Maths" && (IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result) || IsBlank(Emp_Dropdown_3.Selected.Result) || IsBlank(Ass_Dropdown_3.Selected.Result)),
  DisplayMode.Disabled,
  Category_Dropdown_3.Selected.Result = "English" && (IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result)),
  DisplayMode.Disabled,
  Category_Dropdown_3.Selected.Result = "Both" && (IsBlank(Bus_Dropdown_3.Selected.Value) || IsBlank(Fac_Dropdown_3.Selected.facility) || IsBlank(Cat_Dropdown_3.Selected.Result) || IsBlank(Shi_Dropdown_3.Selected.shift) || IsBlank(Val_Dropdown_3.Selected.Result) || IsBlank(Inc_Dropdown_3.Selected.Result) || IsBlank(Inj_Dropdown_3.Selected.Result) || IsBlank(Pol_Dropdown_3.Selected.Result) || IsBlank(Bod_Dropdown_3.Selected.Result) || IsBlank(Tim_Dropdown_3.Selected.Result) || IsBlank(Task_Dropdown_3.Selected.Result) || IsBlank(Dem_Dropdown_3.Selected.dem) || IsBlank(Incid_Dropdown_3.Selected.Result) ||IsBlank(Wo_Dropdown_3.Selected.Result) || IsBlank(Emp_Dropdown_3.Selected.Result) || IsBlank(Ass_Dropdown_3.Selected.Result)),
  DisplayMode.Disabled,
  DisplayMode.Edit
)

Best Regards,

Bof

View solution in original post

Thanks a lot. works well. 👍

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (4,121)