cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AmirGh
Helper I
Helper I

Deep Linking not working with filter

In my application, I have set up a deep linking which is working and is fine. The deep linking takes the user to a Gallery, selected record.

But, I recently tried to add a filter to Gallery to "Show only Open items". When I activate this filter, the the deep linking only takes the user to Gallery screen and does not select the record.

detail as below:

Normal scenario without filter on Gallery which deep linking is working:

Items: in Gallery:

Filter(CTRList,CTRProjectNumber=CBProjectList.Selected.Result)

CBProjectList is a combo box  to select a project

AmirGh_0-1621908369790.png

When I have the above filter, everything works as expected.

 

But, when I add another criteria to filter, then the deep linking will not select the record in Gallery:

 

AmirGh_1-1621908437083.png


If(OpenOnlyCB_1.Value=false,Filter(CTRList,CTRProjectNumber=CBProjectList.Selected.Result),Filter(CTRList,And(CTRProjectNumber=CBProjectList.Selected.Result,And(Status.Value<>"Approved",Status.Value<>"Superseded",Status.Value<>"Rejected"))))

 

 

 

12 REPLIES 12
WarrenBelz
Super User
Super User

Hi @AmirGh ,

Firstly try this

Filter(
   CTRList,
   CTRProjectNumber=CBProjectList.Selected.Result && 
   (
      !OpenOnlyCB_1.Value ||
      (
         Status.Value<>"Approved" && 
         Status.Value<>"Superseded" &&
         Status.Value<>"Rejected"
      )
   )
)

 

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.

 

Hi, Still the same issue.

A bit more detail: This is what happens when Deep link clicked with the additional filter

 

AmirGh_0-1621941943060.png

 

 

But, with the basic filter, it select the record.

AmirGh_1-1621942502530.png

 

Just wondering the default value for the tick box can make a difference? It is unticked as the default as I assumed that is better

@AmirGh ,

How are you selecting the record with the deep link criteria? What you have there selects from a drop-down with additional criteria on a checkbox.

AmirGh
Helper I
Helper I

The Gallery On Select: Set(VarSelectedCTR, ThisItem)

the Gallery default: If(VarSelectedCTR.ID<>0,VarSelectedCTR,Blank())

The deep link email notification:

<p>Select <a href='https://apps.powerapps.com/play/*************&CheckID="&VarSelectedCTR.ID&" '> link to the application </a> to update.</p>");

 

App, On Start:

Set(VarURLID, Value(Param("CheckID")));
If(VarURLID <>0, Set(VarSelectedCTR,LookUp(CTRList, ID=VarURLID));Navigate(CTRSubmission))

Hi @AmirGh ,

I am a bit lost here - where does varSelectedCTR (the deep linked record) come into this?

Hi,

VarSelectedCTR is a variable which is set to the selected item in gallery. This is required for other reasons in the application and works better than just referring to "Gallery.SelectedItem".

Each record has an ID in the data source, Once selecting record, VarSelectedCTR is set to the selected record.

then CheckID= VarSelectedCTR.ID.

So, when clicking on the deep link, it should take the user to the screen and select the record which its ID = VarselectedCTR.

It works well with filter on one criteria, once adding a new filter, then it somehow make the variable blank and does not selected any item in gallery

Hope this clarifies.

HI @AmirGh ,

I will go back a step here and tell you what I do (I have several apps that work this way).

On the Gallery OnSelect

Set(gblID,ThisItem.ID)

then the Form Item

LookUp(
   ListName,
   ID=gblID
)

 on the incoming App OnStart

If(
   !IsBlank(Param("MyID")),
   Set(
      gblID,
      Value(Param("MyID"))
   );
   Navigate(YourFormScreen),
   Navigate(YourGalleryScreen)
)

This makes the filter on the gallery irrelevant - you simply set a Global Variable to the ID of the item in the form , either by selecting the item in the gallery, or by the incoming parameter.

 

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.

AmirGh
Helper I
Helper I

Thanks for your response.

I can't remove the filter as the deep link is only one way of working in the application. People directly go to application and filter on the project that they want.

 

@AmirGh ,

Sorry, I am a little lost again - what is the OnSelect of the gallery?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,670)