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 / Repeating table - coll...
Power Apps
Answered

Repeating table - collection patched data not showing in fields

(0) ShareShare
ReportReport
Posted on by 1,599 Super User 2024 Season 1

Hello,


I've followed @ShaneYoung's great video on repeating tables here

 

On my save button, I am using this Fx:

Patch(colDocData, ThisItem, {Subtopic: Subtopic_dd.Selected.Result, Argument: Argument_input.Text, Evidence: Evidence_input.Text}); Collect(colDocData, {Subtopic: Subtopic_dd.Selected.Result})

This is clearly sitting in my collection:

sudosaurus_0-1692315913916.png

However, when viewing the saved item in my app, the fields are blank - what gives?

sudosaurus_1-1692315974842.png

Any help, I would appreciate! 🙂

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @sudosaurus 

    What is the Items property of your gallery?

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    Hi @EddieE I’m using a collection - colDocData - but the actual data afterwards will be saved to SharePoint list. For now the values should show from the collection right?

  • EddieE Profile Picture
    4,641 Moderator on at

    @sudosaurus 

    Yes, that’s correct. Do you have any filters on the gallery? Can you share the actual formula for the Items

     

    You can also check that colDocData has data by adding a label outside your gallery and using 

    // Text property of label
    CountRows(colDocData)

     

    If there’s data there then you need to look at how your gallery controls (ie labels, etc) are setup.

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    @EddieE the items property of the gallery is set to: colDocData

     

    The items property of my subtopic dropdown is set to:

    ForAll(Distinct(Filter(TopicsTable, Topic = Topic_dd.Selected.Result),Subtopic), {Result: ThisRecord.Value})

    My collection is created using this:

    ClearCollect(colDocData, {Subtopic: "", Argument: "", Evidence: ""});

     

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    @EddieE - have you had a look at my latest post?

  • EddieE Profile Picture
    4,641 Moderator on at

    @sudosaurus 

    Where is this formula used?

    ClearCollect(colDocData, {Subtopic: "", Argument: "", Evidence: ""});

     

    Also, did you add a label to test if the collection has any records?

     

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    @EddieE that is used on a button on the home screen which takes you to the screen with the form fields.

    // create colDocData collection
    ClearCollect(colDocData, {Subtopic: "", SubtopicBreakdown: "", Argument: "", Evidence: ""});
    
    // sets item as new
    Set(varNewItem,true);
    
    // get the record
    Set(
     varCurrentRecord,
     Defaults(DocData)
    );
    
    // go to new item screen
    Navigate(
     NewItem_scrn,
     ScreenTransition.Fade,
     {locFormDisplayMode: "New"}
    );
  • EddieE Profile Picture
    4,641 Moderator on at

    @sudosaurus 

    Ak ok, thanks.

     

    Did you also test this?

    // Text property of label
    CountRows(colDocData)

     

    If there is data there (like your first image above) then

    - have a look at the tree view of your gallery to check layering eg a label maybe hiding the label with the record data

    - check text color of the label, eg is it set to a dark color?

    - look for other controls in the tree view that may be affecting the output

    - etc

     

    Also, I'm curious as to what this does - I've never seen this used anywhere before ...

    // get the record
    Set(
     varCurrentRecord,
     Defaults(DocData)
    );

     

  • sudosaurus Profile Picture
    1,599 Super User 2024 Season 1 on at

    @EddieE 

    sudosaurus_1-1692653733525.png

    sudosaurus_0-1692653604689.png

    In response to your last question, someone on another post suggested I use that in my patch:

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Double-patch-not-validating/m-p/2305020

  • EddieE Profile Picture
    4,641 Moderator on at

    @sudosaurus 

    2 things:

     

    1. Can you check if your gallery is pulling the first or last record from your collection? If Last, then that's why you aren't seeing anything in your gallery because there's no data in the field you are displaying in the gallery.

     

    2. I cannot see anywhere in that post where the responder has suggested using that code snippet. I think you've made some adjustments to their suggestions. From what I can tell, that code won't do anything and even possible cause an error?

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard