cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
d3ell
Helper V
Helper V

displaymode property dependant on DD list selection and if other items are blank

HI i have a a form which has a save button which can be used at all times while a job is in progress so that at each stage when the job is updated the person using the form presses save and the form is submitted.

 

When a job status is changed to complete i am noticing that my users aren't always filling out the last part of the form and then since the job is completed these items are never returned too and filled in so what i'm wanting to do is have the display mode of the button change so that when the job status is changed to complete that it then checks whether certain other form fields have data in them and if they don't then the button doesn't work.

 

I'm having trouble as in normal circumstances the fields at the end of the form are blank (and not visible) until the job is set to complete so if i do a formula on the displaymode of the save button asking if these fields are blank then this is always going to return back as true.

 

Is there a way to say something like  If(JobStatusDD.SelectedText.Value = "5 - Complete ") then If(IsBlank(EngineerCommentsValue.Text) && IsBlank(DateCompleteValue.SelectedDate)

i have tried looking at switch with the following, however not sure if this is the right function, as it doesnt seem to be working.

 

Switch(JobStatusDD.SelectedText.Value = "5 - Complete ", IsBlank(EngineerCommentsValue.Text) && IsBlank(DateCompleteValue.SelectedDate),DisplayMode.Edit,DisplayMode.Disabled)

 

please help!

 

 

 

5 REPLIES 5
eka24
Super User
Super User

Try

If(JobStatusDD.SelectedText.Value = "5 - Complete ")&I&IsBlank(EngineerCommentsValue) && IsBlank(DateCompleteValue.SelectedDate), DisplayMode.Disabled, DisplayMode.Edit)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Thats just giving an error - not sure if this is right from your proposed formula? = " &I&"

 

I have tried just doing the "&&"  between each items as below 

If(JobStatusDD.SelectedText.Value = "5 - Complete " &&IsBlank(EngineerCommentsValue) && IsBlank(DateCompleteValue.SelectedDate), DisplayMode.Disabled, DisplayMode.Edit)

however when jobstatus = "5 - complete " and either one of the others are changed the button changes its display property.  Ie. as soon as an  engineer comment is put it this sets that part of the formula to false and changes the displaymode to edit again.  i dont want the displaymode to change to edit until the commenents, date (and other fields, that i havent listed) are populated.  

Bump. (Sorry). Is anyone able to assist with this one? 

ta

Please show the error. If possible your form as well

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

There is no error as such, i just cant get the functionality to work correctly.

 

What i needed was to be able to have IF a certain dropdown item was selected from a dropdown then other textinputs had to be !IsBlank - because i need 4 items to be !IsBlank i need to use the Or || operator and when i'm mixing if DD.SelectedText.Value = "5" & IsBlank(Textinput1.Text) || IsBlank(TextInput2.Text) etc etc.

 

I think its cause i need the && and also || - i have come up with a workaround that is working for me although its probably not the best where i have just created another button which is only visible when DD.SelectedText.Value="5" and i have set that displaymode property to only be editable if all my form fields are complete.  I have then changed the old save button to not be visible when the new one is.

 

Like i said, might be a bit rough, but it functions! - Sure there will be aformula for what i wanted, just couldn't get my head around it!

 

Thanks

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,142)