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 / Gallery collection isn...
Power Apps
Unanswered

Gallery collection isn't updating correctly

(0) ShareShare
ReportReport
Posted on by

Dear Community,

 

I am facing a problem in binding a collection to gallery wherein, the data is not correctly bound. ID is correctly being passed while calling flow but isn't updating correctly in list or when in gallery. It weirdly shows 000 in some cases while correct in other. What could be wrong here?

 

Set(MaterialDetails,Cost.Run(Right("000000000000000000" & Self.Text,18)));

UpdateIf(

MaterialCollectionUpdated,

RowId =ThisItem.RowId,

    {

    MaterialID:Right("000000000000000000" & Self.Text,18),

    MaterialDesc:MaterialDetails.material_description,

    STK3:MaterialDetails.stk3,

    ItemTotal: Text( Value(MaterialDetails.stk3,"en-US") * Value(ThisItem.MaterialQuantity,"en-US"), "###,###.00", "en-US")

    }

);

ClearCollect(MaterialCollection, MaterialCollectionUpdated);  

 

Vaibhav_k_0-1694446803474.png

 

 

//Gallery Items

Sort(MaterialCollection,RowId)

 

 

Categories:
I have the same question (0)
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Vaibhav_k ,

     

    Could you show me more details and where do you set the code on?

    Set(MaterialDetails,Cost.Run(Right("000000000000000000" & Self.Text,18)));
    
    UpdateIf(
    
    MaterialCollectionUpdated,
    
    RowId =ThisItem.RowId,
    
     {
    
     MaterialID:Right("000000000000000000" & Self.Text,18),
    
     MaterialDesc:MaterialDetails.material_description,
    
     STK3:MaterialDetails.stk3,
    
     ItemTotal: Text( Value(MaterialDetails.stk3,"en-US") * Value(ThisItem.MaterialQuantity,"en-US"), "###,###.00", "en-US")
    
     }
    
    );
    
    ClearCollect(MaterialCollection, MaterialCollectionUpdated); 

     

    Best regards,

    Rimmon Li

  • Vaibhav_k Profile Picture
    on at

    @v-mengmli-msft @This code is on change of text input inside gallery for first column shown in screenshot.

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Vaibhav_k ,

     

    Do you want to update in batches or just one record? If you just want to update the current Text Input value to the original record, then try the following code:

    Set(MaterialDetails,Cost.Run(Right("000000000000000000" & Self.Text,18)));
    Update(
    MaterialCollectionUpdated,
    ThisItem,
     {
     MaterialID:Right("000000000000000000" & Self.Text,18),
     MaterialDesc:MaterialDetails.material_description,
     STK3:MaterialDetails.stk3,
     ItemTotal: Text( Value(MaterialDetails.stk3,"en-US") * Value(ThisItem.MaterialQuantity,"en-US"), "###,###.00", "en-US")
     }
    );
    ClearCollect(MaterialCollection, MaterialCollectionUpdated); 

     

    Best regards,

    Rimmon Li

  • Vaibhav_k Profile Picture
    on at

    The rowId is necessary as we have multiple rows. I think it gets updated in batches

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @Vaibhav_k ,

     

    Can you show me what this data showing errors looks like in your data source?

     

    Best regards,

    Rimmon Li

  • Vaibhav_k Profile Picture
    on at

    @v-mengmli-msft, as shown in screenshot data source should be anything other than 0000. This comes from an api. When entering data, it shows correctly and while saving, the form updates with 0000.

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 431

#2
WarrenBelz Profile Picture

WarrenBelz 360 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 280 Super User 2026 Season 1

Last 30 days Overall leaderboard