Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Combobox information not saving correctly to collection

(1) ShareShare
ReportReport
Posted on by

Hi

I hope you will be able to assist, I think it should be a easy fix but I cannot get my head around it.

I am using a gallery to save multiple entries into a collection which works correctly. The below pictures shows how the information is submitted with the instructions on the "+" button to patch that entry to the collection.

JPCoetzee_2-1721161879459.pngJPCoetzee_1-1721161836687.png

JPCoetzee_3-1721162315319.png

 

Once done with the entries I need to save all the entries to a separate collection through a Submit Button. All the entries are saving correctly however the surface_defects column only shows the last entries and not the previous entries. 

How can I change my code to save Surface_defects column information from all the previous entries and not just show the last entry?

JPCoetzee_4-1721162372092.png

Herewith the code for the submit button:

ForAll(
    Gal_Measures.AllItems,
    Patch(
        col_measuresoffline,
        Defaults(col_measuresoffline),
        {Title:TextCanvas1.Text,
        start_rp: Value(txt_startRP.Text),
        start_width: txt_startwidth.Text,
        end_rp: txt_endRP.Text,
        square_area: txt_SqArea.Text,
        end_width: txt_endwidth.Text,
        length: txt_length.Text,
        surface_defects: Concat(Measure_Defects.SelectedItems,Value & ";")
        }
    )
);

 

Thanks in advance for the assistance

  • Suggested answer
    kylzbaba Profile Picture
    kylzbaba 182 on at
    Combobox information not saving correctly to collection
    Try this.
     
    ForAll(
        Gal_Measures.AllItems As ColItem,
        Patch(
            col_measuresoffline,
            Defaults(col_measuresoffline),
            {Title: ColItem.Title
            start_rp: Value(ColItem.start_rp)
            start_width: ColItem.start_width,
            end_rp: ColItem.end_rp,
            square_area: ColItem.square_area,
            end_width: ColItem.end_width,
            length: ColItem.length,
            surface_defects: ColItem.surface_defects
            }
        )
    );
  • WarrenBelz Profile Picture
    WarrenBelz 145,666 on at
    Combobox information not saving correctly to collection
    Try this format - I am assuming all the controls referred to are in the gallery - if not remove the _Data. reference
     
    ForAll(
       Gal_Measures.AllItems As _Data,
       Patch(
          col_measuresoffline,
          {
             Title: _Data.TextCanvas1.Text,
             start_rp: Value(_Data.txt_startRP.Text),
             start_width: _Data.txt_startwidth.Text,
             end_rp: _Data.txt_endRP.Text,
             square_area: _Data.txt_SqArea.Text,
             end_width: _Data.txt_endwidth.Text,
             length: _Data.txt_length.Text,
             surface_defects: 
             Concat(
                _Data.Measure_Defects.SelectedItems,
                Value, 
                ";"
             )
          }
       )
    );
    ​​​​​​​

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard