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 / Save the content of th...
Power Apps
Answered

Save the content of the gallery in the collection to add to the SharePoint list as a single row.

(0) ShareShare
ReportReport
Posted on by 23

I want to enter data in three "text input fields" in a gallery, first to save them in a collection and then to patch them as a single row in a SharePoint list.

"On Start" I have created a collection - ClearCollect(ServerDetails,{ServerName:"",RackLocation:"",SNOWTask:""}) 

Collection is also showing all details, but I have no idea on how to bring this to a SP list in a single line.
Can you please help?

Thank you!

2022-10-31 15_01_16-Window.png
collection.png
Categories:
I have the same question (0)
  • Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @Manigra 

    For putting the text input values from gallery in the collection:

    Clear(ServerDetails);
    ForAll(GalleryServerDetails.AllItems As Item,
    Collect(ServerDetails,
    {
    ServerName:Item.TextInputServerName.Text,
    RackLocation: Item.TextInputRack.Text,
    SNOWTask:Item.TextInputTask.Text
    }
    )

     

    For putting it in one line is SP,  Do you want all the text concatenated into one column? What are the columns of your SP list?

  • Manigra Profile Picture
    23 on at

    Hello Adrian,

     

    on SharePoint I have three columns called ServerName, RackLocation and SNOWTask and the aim is to store all servers names in column "ServerName" , all Rack Location details in "RackLocation" and Task information's in "SNOWTask"., 

     

    Thank you!

     

    Thank you 

  • Manigra Profile Picture
    23 on at

    My collection is made out of a Gallery ( three Text Input fields ) .. and the save Button is made like this :

    Patch(ServerDetails, ThisItem, {ServerName: TextInputServName.Text, RackLocation: TextInputRackLoc.Text, SNOWTask:TextInputSNOW.Text})); Collect(ServerDetails, {ServerName: "", RackLocation: "", SNOWTask: ""})

     

    So my collection consists of three columns and one column each is to be assigned to a Share Point column - in only one line.

     

    Thank you

  • Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @Manigra 

     

    When you say in only one line, did you meant only one row, correct?

    If so then you can use the Concat function to combine text into one row.

     

    Patch(ServerDetails, ThisItem, {
    ServerName: Concat(GalleryServerDetails, TextInputServName.Text, "; "),
    RackLocation: Concat(GalleryServerDetails, TextInputRackLoc.Text, "; "), 
    SNOWTask: Concat(TextInputSNOW.Text, "; ")
    }));

     

  • Manigra Profile Picture
    23 on at

    correct - one row.

  • Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @Manigra 

    Did this one work for you?

    Patch(ServerDetails, ThisItem, {
    ServerName: Concat(GalleryServerDetails, TextInputServName.Text, "; "),
    RackLocation: Concat(GalleryServerDetails, TextInputRackLoc.Text, "; "), 
    SNOWTask: Concat(TextInputSNOW.Text, "; ")
    }));

     

  • Manigra Profile Picture
    23 on at

    Hello Adrian,

     

    unfortunately, it did not work, I am a complete novice.

    Eventually I need to explain better what I have:

    - my Submit Button is now executing the following command

       Patch(IMACD_Request_List,Defaults(IMACD_Request_List),

       {'Server Name':Text(TextInputServerName)})

     

    where IMACD_Request_List is my SharePoint list

    where 'Server Name' is the column, I want to patch

     

    Now my aim is to get multiple data out of a Gallery ( ServerName, RackLocation and SNOWTask) to each column in that SP but in only just one row.

     

    Hopefully I could explain myself better.

     

    Thanks!

  • Manigra Profile Picture
    23 on at

    sorry, now a little more specific, I have three columns on SP I want to patch with data out of the Gallery and the command that is working now is:

     

    Patch(IMACD_Request_List,Defaults(IMACD_Request_List),
    {'Server Name':Text(TextInputServerName)},
    {'Rack Location':Text(TextInputRack)},
    {'SNOW Task':Text(TextInputTask)}
    )

  • Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @Manigra 

    No worries. So let's say your gallery named GalleryServerDetails has 3 text input boxes (TextInputServerName, TextInputRack, TextInputTask)

    Adrian_Celis_0-1667543269601.png

     

    You want to patch these details into your Sharepoint list named IMACD_Request_List in one row like so:

    Adrian_Celis_1-1667543358924.png

     

    Is this correct so far?

    If so, then you can try this one on your submit button:

    Patch(IMACD_Request_List,Defaults(IMACD_Request_List),
    {'Server Name':Concat(GalleryServerDetails,Text(TextInputServerName),"; ")},
    {'Rack Location':Concat(GalleryServerDetails,Text(TextInputRack),"; ")},
    {'SNOW Task':Concat(GalleryServerDetails,Text(TextInputTask),"; ")}
    )

     

    If there are errors on this formula, let me know where the error is and what it says.

  • Manigra Profile Picture
    23 on at

    Hello Adrian, I'll give it a try next week and will report back to you. 

    Thanks for your help.

     

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard