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 / Need to build a logic ...
Power Apps
Answered

Need to build a logic based on status change

(1) ShareShare
ReportReport
Posted on by

Hi,

I want to create a logic from gallery as per the picture, based on the status the action button should navigate to respective form.

Example If Status is "New Request", it will take to fill are new Form, If Status is "Form on Draft", then the form is partially filled and need to go navigate to particular form to get it filled. and so on...

Basically based on Action Status, the Action button should navigate accordinly.

Please suggest how to achieve this.

 

Thanks

Sriku

Table.jpg
Categories:
I have the same question (0)
  • Bilakanti Profile Picture
    1,226 on at

    @SrikuYou can utilize the switch statement in the button's OnSelect property to navigate based on the status of the selected row. Please refer to the sample code screenshot below.

    Bilakanti_0-1720020455371.png

     

  • Sriku Profile Picture
    on at

    Let me try this out. Thanks Bilakanti for quick response

  • Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    Hi @Sriku 

     

    I would add a button in the gallery like your picture. Then in the OnSelect property of that button I would do this:

    Add a Switch to check the status for that Line using ThisItem.Status

    In the Switch depending on the Status, Navigate to where you want to go.

     

    I made an assumption that Create, Update and View would go to the Same Screen and show the Same Form,

    But you would pass in the FormMode (this is a property ON the Form Control) and I would do that by passing a Context Variable called _FormMode.

     

     

    Switch(ThisItem.Status,
     "New Request",
     Navigate(FormScreenName, Transition.None, { _FormMode: New })
     ,
     "Form on Draft",
     Navigate(NotSureWhere)
     ,
     "Awaiting SignOff",
     Not Sure what to put here
     ,
     "PLB Signoff Deferred",
     Navigate(FormScreenName, Transition.None, { _FormMode: Update })
     ,
     "PLB Signed Off",
     Navigate(FormScreenName, Transition.None, { _FormMode: View})
    );
    
    
    
    

     

     

    In your Forms DefaultMode property

     

     

    Switch(_FormMode,
     "Update",
     FormMode.Edit
     ,
     "View"
     FormMode.View
     ,
     "New",
     FormMode.New
    );

     

     

    And Bingo what you asked for.


    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

  • Sriku Profile Picture
    on at

    This is what I was looking. Let me try this as well. Great explaination. Thanks a lot FLMike!!

  • Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    Hi @Sriku 

     

    If you can mark it as accepted as solution I would appreciate it, if it works for you.

  • Sriku Profile Picture
    on at

    Hi Mike,

    Need one more help, How to filter from gallery if particular action student action status is approved, it should not list in the Gallery

  • Verified answer
    Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    I'd love to @Sriku but we only benefit when people mark answers, otherwise its just no benefit for us to keep answering people 🙂 thats how we benefit. If my previous answer helped you based on what you asked please mark it if you have another question you should start a new thread (and reference this), otherwise again, we don't get credit.

     

    So going forward please separate asks.

     

    Is the status a text, number of Choice field

     

    Lets assume is text

    Filter(myDataSource, MyStatusColumn <> "Completed")

     

    If its number of choice field or something else let me know.

  • Sriku Profile Picture
    on at

    It is text field, not choice column, 

  • Verified answer
    Michael E. Gernaey Profile Picture
    53,974 Moderator on at

    Ok @Sriku 

     

    I updated the "marked answered post" with the query for the text.

     

    The formula is

     

    Filter(DataSourceName, Expressions)

     

    Filter(DataSource, StatusColumn <> "Status Column Text");

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard