cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Skitzer1985
Frequent Visitor

Applying multiple Displaymode conditions on single button

Hi,

 

Hope someone can help me out. I'm trying to apply a Conditional Format on a button based on 2 different conditions at two different times.

 

Scenario: We use this window to manage and track repairs to assembled products.

 

Skitzer1985_0-1660692210559.png

 

 This is the window. The theory behind the window is that the "Start Repair" button does not enter into Edit Mode unless the Batch Number/Purchase Order Text box is filled out, The "Start Repair" button will turn Green. This is done by a simple IF condition:

 

If(
!IsBlank(BatchNumber),
DisplayMode.Edit,
DisplayMode.Disabled)

 

Skitzer1985_1-1660692573226.png

 

 

Once this button is Green, they can then start the Timer, and this creates and holds a variable until the "Finish Repair" button is pressed and this writes to a sharepoint list. What I'm wanting to do is that once this variable is created, that this button Grey's out.

 

I thought something like:

 

If(
!IsBlank(BatchNumber),
DisplayMode.Edit,
DisplayMode.Disabled

||

(local_Variable.RepairRequired=true),

DisplayMode.Disabled,

Displaymode.Edit)

 

But this isn't have the expected results as I thought, as the Finish and Pause buttons are enabling, but the Start Repair is also staying enabled.

 

I am most likely completely off base on this, and would appreciated some help in figuring this one out.

 

Thank you for your consideration in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Roverandom
Solution Supplier
Solution Supplier

hmmm... I don't quite understand what you need. It would be nice if you could provide the codes for each button to get a general idea. Another thing, I imagine that the buttons that are in gray are disabled, correct?
Anyway, what little I could understand, I imagine you can try like this:

If(
    Or(
        IsBlank(BatchNumber),
        local_Variable.RepairRequired // If this variable is true/false and you want to test if it is true, it is not necessary to put '=true'
    ),
    DisplayMode.Disabled,
    DisplayMode.Edit
)


Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.



Roverandom is a book by J.R.R Tolkien. I'm a big fan of his works and as Frodo, Aragorn or Gollum are already widely used, I decided to use this nickname.

View solution in original post

2 REPLIES 2
Roverandom
Solution Supplier
Solution Supplier

hmmm... I don't quite understand what you need. It would be nice if you could provide the codes for each button to get a general idea. Another thing, I imagine that the buttons that are in gray are disabled, correct?
Anyway, what little I could understand, I imagine you can try like this:

If(
    Or(
        IsBlank(BatchNumber),
        local_Variable.RepairRequired // If this variable is true/false and you want to test if it is true, it is not necessary to put '=true'
    ),
    DisplayMode.Disabled,
    DisplayMode.Edit
)


Hi! I hope I was helpfull. Please always mark the answer that helped you, so others who need it will find it faster.



Roverandom is a book by J.R.R Tolkien. I'm a big fan of his works and as Frodo, Aragorn or Gollum are already widely used, I decided to use this nickname.
Skitzer1985
Frequent Visitor

That worked perfectly. Thank you heaps. Been scratching my head for days on that!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,430)