web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Repeating table using ...
Power Apps
Answered

Repeating table using gallery for SharePoint list

(0) ShareShare
ReportReport
Posted on by 149

Hi!

 

I have two SP List: 

Master List (Title, Project description, ID)

Item List (work task, project type, MasterID <- which refers to the ID of the Master list)

 

I created an app to create new work packages which multiple work tasks and used gallery for it. I used this video for it: https://www.youtube.com/watch?v=xgznk4XlPCo

 

So to create a new collection and to get from the start screen to the „new work package screen“ I took his formula for my button:

 

NewForm('Form new work package');;ClearCollect(Items; {LineTätigkeitBezug:"";LineProjekttyp:""});;Navigate('Screen New work package';ScreenTransition.Cover)

 

This work perfectly to far and I am on my new work package screen and a new collection is called items is available. In this screen at the top I put the editing form „form new work package“ which has the columns of my SP Master List as database. Below that I put my gallery which has my collection „items“ as database:

 
 
 

96F2ED8D-1EE4-4ACA-9917-91962F41D764.jpeg

 

I set the default value of the text input fields in my gallery as following:

Text input work task: ThisItem.LineTätigkeitBezug (named InputTätigkeitBezug)

Text input project type: ThisItem.LineProjekttyp (named InputProjekttyp)

 

I also put a save button in my gallery:

Save button (also creates a new row): Patch(Items; ThisItem; {LineTätigkeitBezug:InputTätigkeitBezug.Text; LineProjekttyp:InputProjekttyp.Text});; Collect(Items; {LineTätigkeitBezug:""; LineProjekttyp:""})

 

So when I want to run through my app and want to add new work task it works perfectly.

 

The only issue. I want the columns „Tätigkeit/Bezug“ and „Projekttyp“ to be choice columns in my SP list. How can I integrate this in my gallery?

 

Thank you very much!

Jasmin

 

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Jasmin_Sch ,

    Simply use combo/DropDown
    Set the Items Property Like below.

    VijayTailor_0-1614107038404.png

    Set the DefaultSelectedItems Property for displaying the Present data for the record.
    like below-

    VijayTailor_1-1614107198440.png

    Thanks,

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay

  • Jasmin_Sch Profile Picture
    149 on at

    Thanks for this quick answer. I will try. 

    But how can I set the item and DefaultSelectedItems Property? I can’t pick them....C8343F77-7CD5-40C6-A5E3-C3DBB57F6FC5.jpeg

  • Jasmin_Sch Profile Picture
    149 on at

    Ok I got you now and put in a new drop down (Status: Offen/Erledigt) into my gallery with the correct item property. But I still cant select the DefaultSelectedItems Property.

     

    When I start the app, fill my first row in the gallery and want to add another row by clicking the save button it only shows me the value “offen” in my status drop down. So when I selected “Erledigt”  it switches back to “Offen” after I clicked the save button.

     

    Save Button:

    Patch(Items; ThisItem; {LineTätigkeitBezug:InputTätigkeitBezug.Text; LineProjekttyp:InputProjekttyp.Text; LineStatus:InputStatus.Selected.Value});; Collect(Items; {LineTätigkeitBezug:""; LineProjekttyp:""})

     

    OnSuccess Property for my new work package form: ForAll(Items;Patch('3400 ILLU Arbeitspakete Items';Defaults('3400 ILLU Arbeitspakete Items');{Title:LineTätigkeitBezug;Projekttyp:LineProjekttyp;Status:LineStatus ;MasterID: 'Form new work package'.LastSubmit.ID}))

    It shows me the error: The type of argument of status doesn’t match with the expected type “record”. Type “text” was found.

     

    My button to build a new collection was edited as following:

    ('Form new work package');;ClearCollect(Items; {LineTätigkeitBezug:"";LineProjekttyp:""; LineStatus:""});;Navigate('Screen New work package';ScreenTransition.Cover)

     

    What may be the cause for this?

     

    Thank you!

  • Jasmin_Sch Profile Picture
    149 on at

    Hi @VijayTailor 

     

    I did some changes but still I could not find the final solution. So could you please help me:

     

    This is my choice column in my gallery 

    43675D3E-0BA3-4F14-A42C-41BD377EE071.jpeg

    To create a collection at the beginning I set this formular to my button:

     

    NewForm('Form new work package');;ClearCollect(Items; {LineTätigkeitBezug:"";LineProjekttyp:"";LineStatus:"";} ;;Navigate('Screen New work package';ScreenTransition.Cover)

     

    My save button:

    Patch(Items; ThisItem; {LineTätigkeitBezug:InputTätigkeitBezug.Text; LineProjekttyp:InputProjekttyp.Text; LineStatus:'Input Status';;Collect(Items; {LineTätigkeitBezug:""; LineProjekttyp:"";LineStatus:””})

     

    But an error shows up in the OnSuccess property of my form:

    ForAll(Items;Patch('3400 ILLU Arbeitspakete Items';Defaults('3400 ILLU Arbeitspakete Items');{Title:LineTätigkeitBezug;Projekttyp:LineProjekttyp;Status:LineStatus;MasterID: 'Form new work package'.LastSubmit.ID}))

    Error here: Type of argument Status does not match with expected type record. Found was text

     

    Please help me how to solve this.

    Thank you!

  • Verified answer
    Jasmin_Sch Profile Picture
    149 on at

    I solved it now!!

     

     

    ForAll(Items;Patch('3400 ILLU Arbeitspakete Items';Defaults('3400 ILLU Arbeitspakete Items');{Title:LineTätigkeitBezug;Projekttyp:LineProjekttyp;Status:{Value:LineStatus}; MasterID: 'Form new work package'.LastSubmit.ID}))

     

    Patch(Items; ThisItem; {LineTätigkeitBezug:InputTätigkeitBezug.Text; LineProjekttyp:InputProjekttyp.Text;LineStatus:'Input Status'.Selected.Value});;Collect(Items; {LineTätigkeitBezug:""; LineProjekttyp:"";LineStatus:"" })

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard