cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Chandu
Level: Powered On

On Button Click, DisplayForm is not Showing Gallery.Selected Items

In a Screen1, I am having 4 Buttons and 1 Gallery like NEWPTI, NEWPDI, ObservationListGallery, PTIButton, PDIButton

In a Screen2, I am having one DisplayForm

Initially, Screen1, Onvisible: Set(varTestType, "PTI") [ObservationListGallery Default Items]

                             PTIButton Onselect: Set(varTestType, If(varTestType = "PTI", "PDI", "PTI"))

                             PDIButton Onselect: Set(varTestType, If(varTestType = "PDI", "PTI", "PDI")

                            ObservationListGallery Items: Filter('[dbo].[TEST_DATA]', TEST_TYPE = varTestType && TASK_NUM = DataCardValue49.Text)

                             NEWPTI Onselect: Navigate('ViewPTI&PDIScreen', ScreenTransition.None)

                             NEWPDI Onselect: Navigate('ViewPTI&PDIScreen', ScreenTransition.None)

On Screen2, DisplayForm Items: ObservationListGallery.Selected

 

 

When PTIButton is Clicked, ObservationListGallery Items Changed based on the Formula in its Items and NEWPTI will be Visible.

When PDIButton is Clicked, ObservationListGallery Items Changed based on the Formula in its Items and NEWPDI will be Visible.

 

Now my Issue is when I click NEWPTI/NEWPDI it Navigates to Screen2, But the DisplayForm is Showing "No Items to Display" Sometimes and Sometimes the data is showing Correctly.

How should I Solve this Issue, Can anyone help me with this?

1 ACCEPTED SOLUTION

Accepted Solutions
Eelman
Level 8

Re: On Button Click, DisplayForm is not Showing Gallery.Selected Items

You have to somehow "tell" the DisplayForm which item to display. The standard way to do this with a gallery is the chevron, however, you could also put as many other icons in your gallery as well. Choose another icon and use that but the form needs a reference and you are not currently giving it one it would seem

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: On Button Click, DisplayForm is not Showing Gallery.Selected Items

Hi @Chandu ,

 

Are both NEWPTI and NEWPDI buttons inside the template part of the Gallery control? If so, then this issue shouldn't happen. 

Since you are saying that this issue happens occasionally, I think this is actually related to the time delay when setting the variables. Please wait for some time and see if the record shows correctly.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Chandu
Level: Powered On

Re: On Button Click, DisplayForm is not Showing Gallery.Selected Items

No, both NEWPTI and NEWPDI buttons are not present inside the template part of the Gallery control.

The issue happens Everytime I click NEWPDI, May be it is related to the time delay when setting the variables. After waiting for some time, Sometimes the record shows correctly and Sometimes it shows "No Items to Display".

 

When I deliver this app to users, they will insert N no.of Records and they will not wait to Load the Data. So, It would be Grateful if there is any solution for this.

 

Note: Currently I am using Local SQL Database for testing Purpose. Once the Functionality is Completed we will Move to Azure SQL Database. Is this is the Problem for Slow Data loading? If so, any alternate solution will be there, it would be helpful.

Eelman
Level 8

Re: On Button Click, DisplayForm is not Showing Gallery.Selected Items

@Chanduit sounds like your buttons (which are not part of your gallery) are not selecting an item to display in your form. I think that, maybe why it shows sometimes and not others, is because you are intermittently selecting a gallery item as you go about your design?

 

try putting a chevron (ie ">") inside your gallery and add the Navigate code to its OnSelect property. Also, remove the navigate code from your buttons.

 

see if that fixes it?

 

 

Chandu
Level: Powered On

Re: On Button Click, DisplayForm is not Showing Gallery.Selected Items

I am Using chevron (ie ">") inside my gallery for another Functionality. I must Navigate through these Buttons for my requirement.

Is there is any other alternate solution by using these buttons, will be grateful.

Eelman
Level 8

Re: On Button Click, DisplayForm is not Showing Gallery.Selected Items

You have to somehow "tell" the DisplayForm which item to display. The standard way to do this with a gallery is the chevron, however, you could also put as many other icons in your gallery as well. Choose another icon and use that but the form needs a reference and you are not currently giving it one it would seem

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,577)