web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / No item to display in ...
Power Apps
Answered

No item to display in form upon dropdown change

(0) ShareShare
ReportReport
Posted on by 22

Hi, the form will be displayed by selecting the gallery item. However, I would like to have the first item in the gallery to be displayed in the form by default. How do I do that? Also, would it be possible to have the gallery item highlighted if it is selected? 

 

Prior to this screen, form submitted with a thank you screen. Then, it navigates back to the same form which it's drop down and gallery shows 'Open' Item by default. Changing the drop down status to 'Closed', shows this screen. 

mysteph_0-1625032977575.png 

 

Categories:
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @mysteph,

    Do you want the form to display the first record of the Gallery by default?

    Could you please tell me that how you set the items property of the Gallery?

    Actually, Gallery.Selected always recognize the first record by default which means that even you do not select any record in the gallery, it will always select the first record by default.

    I have a test on my side, please take a try as below.

    If you want the form display the first record, then you should set the Item property of the Form as below.

     

    If(
     Form2.DisplayMode = Edit,
     Gallery8.Selected,
     If(
     Form2.DisplayMode = View,
     First(
     Filter(
     Tab1,
     Category = Dropdown4.Selected.Result
     ) // The Filter() is the formula I set for the Items property of the Gallery, please replace it with yours.
     )
     )
    ) 

    Since you want the mode of the Form depends on the Dropdown seletced value, I think you should set the OnChange property of the Dropdown as below:

    If(
     Dropdown4.Selected.Result = "C",
     EditForm(Form2),
     If(
     Dropdown4.Selected.Result = "A",
     ViewForm(Form2)
     )
    )

    Check if this could help you.

    Regards,

    Qi

     

  • mysteph Profile Picture
    22 on at

    Hi @v-qiaqi-msft 

    The form (IssueForm) item = StatusGallery.Selected

    The gallery (StatusGallery) item = Filter('Issue',Status.Value=FormStatusDropDown.Selected.Value,Email= User().Email)

    The dropdown (FormStatusDropDown) item = Choices([@'Issue'].Status)

    My SP List = Issue. 

     

    I tried your suggestion and it did not work. 

     

    This is the scenario: 

    1. Select dropdown to Closed

    Form shows 'No Item Display'. However, data will be shown on form once Gallery Item selected. 

    2. Select dropdown to 'Open'

    Do nothing and change back to 'Closed', last selected item is displayed. 

    However, if gallery item selected, change to 'Closed', Form shows 'No Item Display'.

     

    I hope that makes sense. 

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @mysteph,

    Could you please tell what is the specific error of my solution, does the previous issue stay?

    It would be appreciated if you could provide a screenshot how my solution operate on your side.

    I just give a sample because I do not know your data type, so I assume that the column you fill in the dropdown is a Text type rather than a Choice type. If this is the point, please try to modify the formula as below:

    Item property of the Form as below.

    If(
     Form2.DisplayMode = Edit,
     StatusGallery.Selected,
     If(
     Form2.DisplayMode = View,
     First(
     Filter(
     'Issue',)
     Status.Value=FormStatusDropDown.Selected.Value,Email= User().Email
     ) 
     )
     )
    )

    FormStatusDropDown OnChangeproperty:

    If(
     FormStatusDropDown.Selected.Result = "Open",
     EditForm(Form2),
     If(
     FormStatusDropDown.Selected.Value= "Closed",
     ViewForm(Form2)
     )
    )

    Note that what scenario my solution works for. Once the FormStatusDropDown selected Open, StatusGallery will display all the related open records, and the form will be in edit mode and display the first record from your gallery. Once the FormStatusDropDown selected Closed, StatusGallery displays all the related Closed records, and the form will be in view mode and display the first record from your gallery.

    Regards,

    Qi

     

  • mysteph Profile Picture
    22 on at

    Sorry, new with this. Here is the error. Please let me know what other information needed. Thank you. 

     

    mysteph_0-1625053710237.png

    I replaced the names accordingly as below. Names might be different, testing on different duplicated screens. 

    mysteph_3-1625053998582.png

     

     

     

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @mysteph,

    The delegation warning is not an error message. It is a warning that remind you of the data rows limit, which means that if your data rows exceeds 2000, some data may not display correctly.

    If your data set is normal and does not exceeds 2000, please ignore this warning message which will not affect your app.

    If you want to avoid this, you could use the With() function as below:

    If(
     Form2.DisplayMode = Edit,
     Gallery8.Selected,
     If(
     Form2.DisplayMode = View,
     With(
     {
     ds: Filter(
     Tab1,
     Category = Dropdown4.Selected.Result
     )
     },
     First(ds)
     )
     )
    )

    Regards,

    Qi

  • mysteph Profile Picture
    22 on at

    Hi Qi, 

     

    The warning message is gone now. I tried your solution, it works IF I did not select any of the gallery item. 

     

    These are the steps performed and result as expected: 

    1. Select dropdown = Open, it shows first gallery item. 

    2. Switch to dropdown = Close, it shows the first gallery item. 

     

    However, 

     

    1. Select dropdown = Open & Select any Gallery Item (besides the first item).

    2. Switch to dropdown = Close, it shows the first gallery item. 

    3. Switch to dropdown = Open again, it shows 'No item to display' message. 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @mysteph,

    I have said that my solution works for the following scenario:

    Once the FormStatusDropDown selected Open(C in my scenario), StatusGallery will display all the related open records, and the form will be in edit mode and display the first record(by default) from your gallery.

    Once the FormStatusDropDown selected Closed(A in my scenario), StatusGallery displays all the related Closed records, and the form will be in view mode and display the first record from your gallery.

    Form.gif

    What do you need? Always display the first gallery item whatever open or close selected in the dropdown?

    If so, just replace the previous formula you set for the Item as below:

    With({ds:Filter(Tab1,Category=Dropdown4.Selected.Result)},First(ds))

    Remember make sure that you set the OnChange of the dropdown as below:

    If(Dropdown4.Selected.Result="C",EditForm(Form2),If(Dropdown4.Selected.Result="A",ViewForm(Form2)))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard