web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / choice dependent on mo...
Power Apps
Answered

choice dependent on more than one sharepoint column

(0) ShareShare
ReportReport
Posted on by 124

good day to all!  Bit of a mind-blank here, so I am hoping that someone has tried to this before.  I have a home screen on my app, that shows all the open tickets and a few of the more interesting bits about those tickets.  My app has seven 'stages' that it goes through, that are gated and blocked until the previous stage reads as 'complete'  Within each stage, there are different 'status'.  Various groups of people might look at this ticket, and advance the 'state', but it again wont advance to the next 'stage' until the status of 'complete' is chosen.

 

Now the question:  The users want to see what status the ticket is in as well as the stage on the home screen.  The stage is easy enough, as the sharepoint has only ONE column to look up and only seven choices to look at.  However, since there are anywhere from three to five statuses in EACH stage, I need to find a way for the system to query the stage column, find out which stage it is in, THEN query one of seven status columns to find out which state it is in.

 

Below are the columns in question:

davyjones_0-1644522396025.png

So, the 'requeststate' column is the stage, and the other seven would be the possible stages, each with their own statuses in them.

 

This is the code for what I am putting in to show the stage, which is easy enough: ThisItem:RequestState

 

Thank you all!


David

 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @davyjones 

    It is a little unclear exactly what you have in order to provide a specific suggestion, but the concept would be this:

    Switch(ThisItem.RequestState,
     "Stage1", ThisItem.Stage1StatusColumn,
     "Stage2", ThisItem.Stage2StatusColumn, 
     ...etc...
    )

     

    I hope this is helpful for you.

  • davyjones Profile Picture
    124 on at

    Hey Randy!


    Thank you for replying.  Sorry that I did not show enough info.  Here are some of the ways it can go:

     

    The first stage possible is 'SUN', and within SUN, there are the following statuses:

     

    davyjones_0-1644525940453.png

    Then, when it goes to the next possible stage, that would be 'DS', where there are these statuses:

     

    davyjones_1-1644526195326.png

    Then, it goes to 'TechEffort', and so on.  Does this clear a bit up?


    Again, thank you for helping and doing so very quickly!

     

    David

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @davyjones 

    Yes, that formula I provided is what you need.  You will "switch" off of the stage that it is in, then display the value from the appropriate choice column for that stage.

  • davyjones Profile Picture
    124 on at

    I put in what I feel was your solution (shown below) and the system did not seem to like it.  Did I miss something?

     

    davyjones_0-1644527818277.png

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @davyjones 

    If those status columns are all Choice columns, then append .Value to all of them.  i.e. ThisItem.SUN_Status.Value

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard