1

I have 2 screens and DataSource is Excel Table. Screen 1 contains Gallery of Systems, and the TemplateFill property of Gallery is set to below code.Below code is filling System tile according to their previous status. Now, in Screen 2 I have signup form where enduser can select the current status of the instrument using drop down. I would like to update Screen1 System tiles based on last "Current Status" submitted by the enduser.Additionally, I have included the screenshots of before and after excel table update.

Not sure how to proceed with OnSelect Property of Submit button.

  If(Thisitem."Previous Status"="Available",RGBA(54,176,75,100),If(Thisitem."Previous Status"="Out of Service",RGBA(255,0,0,100),RGBA(255,191,0,100))

Before Submission (Default Excel Table)

enter image description here

After Submission by End User

enter image description here

biggboss2019
  • 220
  • 3
  • 8
  • 30

1 Answers1

0

First off, looks like you have an unnecessary nested If(.

Try:

If(
    Thisitem."Previous Status"="Available",
    RGBA(54,176,75,100),
    Thisitem."Previous Status"="Out of Service",
    RGBA(255,0,0,100),
    RGBA(255,191,0,100)
)

Secondly, if you are saying: "I would like to update Screen1 System tiles based on last "Current Status" submitted by the enduser.", it seems to me that you'd substitute "Previous Status" above with "Current Status".

As an aside, if you eliminate " " in your column names, you can avoid double quotes in your code. Consider using PreviousStates or Previous_States.

SeaDude
  • 3,725
  • 6
  • 31
  • 68
  • Thanks! Substituting the "previous status" with "current status" won't work in this case,because I already have pre-populated "previous status" in excel table and the initial gallery tile is based on "previous status". I would like to only change the color of gallery tile, whose "previous status" was change from available to "in use". This way, let's say if no user sign up for "Sys2" then the color or tile will be yellow., because that is the previous status the system is in. – biggboss2019 Oct 22 '20 at 12:23