cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

How to save a data to Sharepoint list (Patch with multiple tasks)

Hello,

 

I have an app that have two input text boxes (one single, second multi) that are placed in gallery.

This gallery data source is a collection that allows users to dynamically add more positions.

 

How can I save data from those input boxes in Sharepoint list.

Screenshot for reference:

 

Elitezone_0-1604053542150.png

when user click ADD MORE - the next task in gallery is added:

 

Elitezone_1-1604053591441.png

What kind of sharepoint field should I use and how to Patch multiple tasks in one sharepoint field with a ; or any other delimeter. Will it work correctly or should every task be added as a different record?

 

Those tasks must be later filtered in a gallery somehow.

 

Functions:

Screen OnVisible:

If(CountRows(colNumberedGUIDS) = 0,ClearCollect(colNumberedGUIDS, GUID() ))

Gallery items:

colNumberedGUIDS

Add task:

Collect( colNumberedGUIDS, GUID())

Delete task:

Remove(colNumberedGUIDS,Last(colNumberedGUIDS))

 

Please advise. Thank you as always.

2 REPLIES 2
Highlighted
Post Prodigy
Post Prodigy

I managed to create a simple Patch function but it does not work well.

 

Patch (Obrazy_obecnosc, Defaults (Obrazy_obecnosc), {Nazwa_zadania:Zadanie_nazwa.Text},{Opis_zadania:Zadanie_opis})

 

When I click it it create a new record, and it is only patching last item.

 

Sometimes in gallery there are 10 items. I do not know where to patch gallery2...

 

I tried this but it doesn't work (invalid use of '')

ForAll(Gallery2.AllItems,
    UpdateIf(
        Obrazy_obecnosc, ID = Value('Identyfikator (ID)'.Text),
        {Nazwa_zadania: Nazwa_zadania.Text, Opis_zadania: Opis_zadania.Text}
    )
)
Highlighted
Post Prodigy
Post Prodigy

Anyone?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,356)