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

Two ways to get to a filtered data table

Hi, I have two galleries, one is a more detailed gallery and the other is more general; however, I want to be able to navigate to a different screen that has a data table on it that will populate based on whether I pick from the first gallery or the second. As of now, it only is working on the first gallery selection, if I choose an item from the second gallery selection it will still just bring up whatever was last selected on the first gallery. 

 

Gallery 1:

Techgallagher_0-1599845378728.png

Gallery 2: 

Techgallagher_1-1599845413452.png

 

This is the current formula I have for the items property of the data table:
SortByColumns(Search(Filter('[dbo].[970_item_format_item_mast]',
(part_name = 'Part Selection Gallery'.Selected.PartName || part_name = 'Image Gallery'.Selected.'Part Name')

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Techgallagher 

 

Can you try to setup the configuration as:

 

Part Selection Gallery -> OnSelect -> Set(SelectedPart, 'Part Selection Gallery'.Selected.PartName)

Image Gallery-> OnSelect -> Set(SelectedPart, 'Image Gallery'.Selected.'Part Name')

 

DataTable -> Items -> 

SortByColumns(Search(Filter('[dbo].[970_item_format_item_mast]',part_name = SelectedPart),...Search expression),...sort expression)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

10 REPLIES 10
yashag2255
Dual Super User II
Dual Super User II

Hi @Techgallagher 

 

Can you try to setup the configuration as:

 

Part Selection Gallery -> OnSelect -> Set(SelectedPart, 'Part Selection Gallery'.Selected.PartName)

Image Gallery-> OnSelect -> Set(SelectedPart, 'Image Gallery'.Selected.'Part Name')

 

DataTable -> Items -> 

SortByColumns(Search(Filter('[dbo].[970_item_format_item_mast]',part_name = SelectedPart),...Search expression),...sort expression)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

For some reason still when I choose from the first gallery it keeps showing me the first item in that gallery and not the one I selected from the image. All the details on this gallery are below

Social Feed layout displaying the image and the body
Items property of the image gallery:

Filter('inventory Catalog - Details', Categories = cat_Gallery.Selected.Result)

Body Text property: 

ThisItem.'Part Name'

On select property of the image: 

Navigate('Individual Part Data Screen',ScreenTransition.Fade);
Set(SelectedPart, 'Image Gallery'.Selected.PartName);
UpdateContext({filterOn:true})

Here is what the gallery looks like

Techgallagher_0-1599847034954.png

When I select the image for this it should take me to that data table screen and show me a symmetrical u cup info but it keeps defaulting to Piston buffer cap which is the first item in this image gallery

 

 

Hi @Techgallagher 

 

Can you append Select(Parent) at the beginning of the OnSelect property of all the controls inside Gallery?

 

Example: Select(Parent);Set(SelectedPart, 'Image Gallery'.Selected.PartName); UpdateContext({filterOn:true});Navigate('Individual Part Data Screen',ScreenTransition.Fade);

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

I updated it, but still no luck 😕

Techgallagher_0-1599847722418.png

 

 

 

@Techgallagher 

 

What happens when you change 'Image Gallery'.Selected.PartName to ThisItem.PartName? Try to change this at both galleries and let me know the results.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Okay, so I am dumb and the initial answer with selected part worked, I just never updated the label to display selected part instead of the firstgallery.selected.partname

 

But now I have another issue: So I changed the label to be "Part Name: " & SelectedPart and that works as it should, but below that I have an html text box that is supposed to be the selected part's description. If I do SelectedPart I get no options to show part description. Any thoughts? 

@Techgallagher 

 

If you want to show the show the related details elsewhere, I would suggest you to change a few things:

 

Part Selection Gallery -> OnSelect -> Set(SelectedPart, 'Part Selection Gallery'.Selected)

Image Gallery-> OnSelect -> Set(SelectedPart, 'Image Gallery'.Selected)

 

DataTable -> Items -> 

SortByColumns(Search(Filter('[dbo].[970_item_format_item_mast]',part_name = SelectedPart.'Part Name'),...Search expression),...sort expression)

 

Label -> "Part Name "&SelectedPart.'Part Name'

Description can be retrieved using SelectedPart.'Part Description'

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thank you for the quick response, but I am getting an incompatible type error when I set it at that. I think it needs to be a text value 

Techgallagher_0-1599849480107.png

 

@Techgallagher 

 

The issue is occurring because the schema for both tables is different. You should create a new variable to save Description.

Select(Parent);Set(SelectedPart, 'Image Gallery'.Selected.PartName);Set(SelectedPartDescription, 'Image Gallery'.Selected.PartDescription); UpdateContext({filterOn:true});Navigate('Individual Part Data Screen',ScreenTransition.Fade);

 

Apply the same change to other gallery. You can use SelectedPartDescription variable to retrieve the value.

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (56,954)