Announcements
I have a question, I created a button to store my gallery data into collections.
if i use the button in this code
It will bring the last selected line data into Collections.
I want the data in the gallery to import the collections correctly.
@Thanapat_Tai This is because you are updating same record in collection again. Try similar to this:
Collect(Collection2, ForAll(Gallery1.AllItems, { Spalte1: Besteller.Value, Spalte2: Kostenstelle.Value, Spalte3: Verwendung } ) )
Try other solutions given on below threads:
Please click Accept as solution & 👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it 👍
@ganeshsanap I have tried it as you said. But the data from the gallery to the collections is still repeated.
@Thanapat_Tai If you don't want to collect it every time user clicks on button, use ClearCollect() function instead of Collect() like:
ClearCollect(Collection2, ForAll(Gallery1.AllItems, { Spalte1: Besteller.Value, Spalte2: Kostenstelle.Value, Spalte3: Verwendung } ) )
@ganeshsanap I have tried it1) In Gallery, lines 1 and line 2 have different values. , like this:
2) But when I put the value from Gallery and put it in the collection, the data will repeat the value I selected, like this:
Data in Collections i must beitem 1 Title:10000 field_1:PC2209003 field_2:TEST field_3:TEST field_4:2000 field_5:TEST01item 2 Title:20000 field_1:PC2209003 field_2:TEST field_3:TEST field_4:3000 field_5:TEST03Must be as I put in the Gallery.
@Thanapat_Tai
Please try below formula
ClearCollect(Collection2, ForAll(Gallery1.AllItems, { Spalte1: ThisRecord.columnname, Spalte2: thisrecord.columnname, Spalte3: ThisRecord.columnname } ) )
When you are using ForAll() - You want to refer against each record it getting.
Putting control names will give you same values from first row.
Thanks
@vish3027I tried It can be used. Thank you very much.
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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 494
WarrenBelz 352 Most Valuable Professional
11manish 323