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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Form doesn't display s...
Power Apps
Suggested Answer

Form doesn't display selected table item

(1) ShareShare
ReportReport
Posted on by 53
Hi all,
 
I have made a powerapp that shows the material list.
 
Because the datasource is over 2000 rows, I have made filter function.
1. User will select supplier and click on filter button.
2. Filter button then create a collection called "selectedData".
3. Table1's item is selectedData to display the filtered materials.
4. User can select the material in the Table1 which will display on the Form1.
 
The issue that I am facing is that:
The selected item on the Table1 does not display on the Form1.
To be specific, only the first selected item gets displayed and when selecting other items - it doesn't display on the Form1.
 
Thank you all in an advance.
Categories:
I have the same question (0)
  • cha_cha Profile Picture
    4,932 Moderator on at
    What formula are you using for the Items property of your form?
  • Sunbed002 Profile Picture
    53 on at
     
    This is how the powerapp is looking at the moment:
     
    For the Form1's item, it is 
    Table1.Selected
     
    For the Table1's item,
    selectedData
     
    Actually, selectedData is more of trigger - while there are two collections (filtervalue and filtermore).
    filtervalue - is initial filter to break down the datasource for delegation (user will filter by supplier and material type).
    filtremore - is additional filter if the user wants to type down material name.

    Below formula is making the filtervalue collection when filter button is selected (onSelect):
    ClearCollect(
        filtervalue,
            Filter(
                Material_List,
                (IsBlank(comboMtype.Selected.Value) || 'M.Type' = comboMtype.Selected.Value) &&
                (IsBlank(comboSupplier.Selected.Value) || Supplier = comboSupplier.Selected.Value)
        )
    );
    
    Set(selectedData,filtervalue);
     
    Below formula is making the filtermore collection when filter button is selected (onSelect):
    ClearCollect(
        filtermore,
            Search(filtervalue,searchMaterial.Value, 'Material Name')
    );
    Set(selectedData,filtermore)
     
    In the end, Table1 does display filtered data for both filtervalue and filtermore collection.

    But it doesn't update the Form1 - only shows the first selected item, but doesn't update when clicking other items.
  • Suggested answer
    VASANTH KUMAR BALMADI Profile Picture
    266 on at

    Hi,

    ***ChatGPT generated response ***

    It seems like you're facing an issue where only the first selected item from Table1 is displayed on Form1, and subsequent selections don't update the form properly. This could be due to a few common issues in Power Apps. Let's go over some potential causes and solutions:

    Possible Causes & Solutions:

    1. Form1's Default Property

    Ensure that Form1 is correctly set to reflect the selected item in Table1. The Default property of the form should be set to the currently selected item in Table1.

    • Solution: Set the Default property of Form1 to:
      Table1.Selected
      This ensures that when an item is selected in Table1, Form1 will update to show the data of the selected item.

    2. Collection Issue (selectedData)

    If you're using a collection to store the filtered data (selectedData), ensure that the collection is correctly updated when the user selects a material from Table1.

    • Solution: After filtering the data and storing it in selectedData, ensure that the OnSelect property of Table1 is correctly setting the selected item to Form1.
      In the OnSelect property of Table1:
      Set(SelectedMaterial, Table1.Selected)

    Then, set the Default property of Form1 to:

    SelectedMaterial

    This will bind Form1 to the selected item in Table1, and allow it to display the updated data when a new row is selected.

    3. Table1’s SelectionMode

    Ensure that the SelectionMode property of Table1 is set to Single if you want to select only one item at a time.

    • Solution: Set the SelectionMode of Table1 to:
      SelectionMode.Single

    This ensures that only one item is selected at a time, which can be displayed in Form1.

    4. Rebuilding the Collection

    If you're recreating or modifying the selectedData collection every time the filter button is pressed, it might cause issues with selection persistence.

    • Solution: Instead of recreating the collection entirely each time, you can use the ClearCollect function to update the collection with filtered data, while preserving the selection state.

      Example of filter and collection update:

      ClearCollect(
      selectedData,
      Filter(
      Materials,
      Supplier = SupplierDropdown.Selected.Value
      )
      )

    After updating the collection, use the OnSelect of Table1 to set the Form1's data as mentioned earlier.

    5. Check Data Types

    Ensure that the fields you're trying to bind to Form1 are compatible with the data types and are properly referenced.

    • Solution: Double-check the fields in Table1 and Form1 to ensure they match in terms of data types and field names. Sometimes issues can arise if there's a mismatch in the data type or name of the field between the table and the form.

    Summary of Steps:

    1. Set Form1's Default property to Table1.Selected.
    2. Use Set(SelectedMaterial, Table1.Selected) in the OnSelect property of Table1.
    3. Ensure Table1's SelectionMode is set to Single.
    4. Make sure selectedData collection is updated and preserved correctly.
    5. Verify that field names and data types match between Table1 and Form1.

    This approach should ensure that Form1 updates with the correct selected material each time a user selects a row from Table1.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard