cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbrines
Post Prodigy
Post Prodigy

Additional Browse and Detail Screens

Hi Guys,

 

I have an app that pulls from a SharePoint list all "open" and "in progress" for the current user.

 

I want to have additional browse and details screens that shows only the completed.

 

I know I can duplicate the screens but how do I get the duplicated browse screen to call the duplicated details screen.

 

Thanks

 

John.

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User III
Super User III

@jbrines 

 

It's always a challenge to write formulas on the forum as there is no editor to validate syntax and references.

I see I had another typo in the formula.  Sorry about that.  I should have scrubbed it a little more.

Use this instead:

SortByColumns(
    Filter('Client Issue', 
        StartsWith('Created By'.Email, glbUser.Email) &&
        StartsWith(Title, TextSearchBox1.Text) &&
        (ddStatus.Selected.Value = "All" || Status.Value = ddStatus.Selected.Value) &&
        (!chkShowComplete.Value || (chkShowComplete.Value && Status.Value = "Complete"))         
    ),
    "ID",
    If(SortDescending1, Descending, Ascending)
)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

RandyHayes
Super User III
Super User III

@jbrines 

Well, you're probably not setting the context variable at any other place in the screen, so it has no value on initial use.  So...it will evaluate to "false" in your formula and thus sort Ascending.

 

So, a good practice to get used to is to coalesce your values all the time.  This will ensure you are not trying to work with a blank value.

 

In the formula change the sort order If statement to:

   If(Coalesce(SortDescending1, true), Descending, Ascending)

 

You should extend this to the other formula as well on the OnSelect of the icon.

    UpdateContext({SortDescending1: !(Coalesce(SortDescending1, true)) } )

 

This will make sure you don't get a "I need to click on the sort icon twice when first using the app to change the order".  It will coalesce it to the default value you want.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

27 REPLIES 27
RandyHayes
Super User III
Super User III

@jbrines 

I would consider altering your existing screens and Galleries to accommodate what you need rather than duplicate the screens.  Duplicating the screens will only give you duplicated formulas that you will have to maintain through the entire app.

 

You can alter the Items property on your Gallery to show whatever criteria you want from your list.  You can also do this based on dropdowns, checkboxes, etc etc to provide whatever you need.  There are plenty of posts on this forum as well as video and blog posts that can assist.

 

Take a look over that concept and if you have specific questions or issues that you run into...post back!

 

I hope this is helpful for you.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
LRVinNC
Super User
Super User

I'm not sure if I completely understanding your question but...

 

The browse screen will have a Navigate function (Navigate, <detail_screen_name>) probably tied to an icon such as > or a pencil or something similar,  that brings up the detail screen.  You'll need to modify this Navigate to use the name of the duplicate detail screen, rather than the original detail screen.  

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

@RandyHayes Thanks for this, makes perfect sense, found a YouTube Video by Shane that makes it look easy.

 

PowerApps filter gallery by dropdown - YouTube

 

You helped me with this app before where we are using the following formula to filter and show everything except Completed for the logged in person.

 

Thanks

 

John.

Do I need to remove this from the Items Value of Browse Gallery or will it work with the filters?

 

SortByColumns(
    Filter('Client Issue', 
        StartsWith('Created By'.Email, glbUser.Email) &&
        StartsWith(Title, TextSearchBox1.Text) &&
        (Status.Value = "Reassigned" || Status.Value = "Notified of Reassignment" ||
         Status.Value = "In progress" || 
         Status.Value = "New"
        ) 
    ),
    "ID",
    If(SortDescending1, Descending, Ascending)
)

 

RandyHayes
Super User III
Super User III

@jbrines 

I'm not entirely clear on what your filters and conditions are, but the formula certainly can be modified to account for anything you want.  If you can provide a little more context on what you want and where, I can certainly help get you to that point.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

 

I want to be able to show the user of the app any item of the Status of completed. We have 5 statuses as shown below. The Status is a column in a SharePoint List.

  • New
  • In progress
  • Reassigned
  • Notification of Reassigned
  • Completed

You helped my in the app show every status except completed which my userbase requested but now they want to be able to see completed items on request.

 

The drop down ideas sounds perfect but instead of dropdown with all 5 statues I was thinking of having two options "Live Issues" (everything except Completed) and Completed.

 

I hope I have explained it a bit better.

 

John.

RandyHayes
Super User III
Super User III

@jbrines 

 

So....let's say you have a Dropdown control (let's call it ddStatus) with an Items property of:
   ["All", "New", "In progress", "Reassigned", "Notification of Reassigned"]

 

And a checkbox for "Show Completed" - let's call it chkShowComplete

Then your formula would be:

 

SortByColumns(
    Filter('Client Issue', 
        StartsWith('Created By'.Email, glbUser.Email) &&
        StartsWith(Title, TextSearchBox1.Text) &&
        (ddStatus.Value = "All" || Status.Value = ddStatus.Value) &&
        (!chkShowComplete.Value || (chkShowComplete.Value && Status.Value = "Complete"))         
    ),
    "ID",
    If(SortDescending1, Descending, Ascending)
)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes 

Thanks for this but

 

It doesn't like "ddStatus.Value" says The Name isn't valid. This identifier isn't recognized.

 

John.

RandyHayes
Super User III
Super User III

@jbrines 

As mentioned :  "So....let's say you have a Dropdown control (let's call it ddStatus) with an Items property of:"

I don't know what the name of your dropdown is, just just replace that in the formula.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes I gave both the dropdown and checklist the same names as you suggested.

 

Screenshot 2021-03-19 151538.JPG

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,461)