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

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

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
Community Support

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.

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.

@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?

 

 

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.

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,185)