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 a gallery rows
Power Apps
Unanswered

Save a gallery rows

(0) ShareShare
ReportReport
Posted on by 237

 

Hi 

 

  In blank horizenatal gallery added Date picker,dropdown and text input.added save button. 

My requirement is  onselect of submit button single row will be save into sharepoint list.

Gallery---Items---input data ------->collect(input)

Please help code  for onselect of submit button.

 

Thanks in advance...!!!

Categories:
I have the same question (0)
  • v-mingkz-msft Profile Picture
    Microsoft Employee on at

    Hi @Powerappsuser11,

    You can try this formula on OnSelect property of button.

    vmingkzmsft_0-1691473556823.png

     

    ForAll(Gallery12.AllItems,Patch(Test3,Defaults(Test3),{Title:ThisRecord.TextInput2.Text,Date:ThisRecord.DatePicker5.SelectedDate,Hours:ThisRecord.Dropdown5.Selected.Value}))

    Note that: 'Test3' is my SharePoint list name. and Title, Date, Hours are columns in my list.

     

    vmingkzmsft_1-1691473592511.png

     

    Best Regards,
    Kyrie

     

     

  • Powerappsuser11 Profile Picture
    237 on at

    Hi @v-mingkz-msft 

     

     I tried above code  but getting errors.

     In sharepoint list project and project line are lookup columns.

    My code is onselect of submit button.

        

    ForAll(Gallery2.AllItems,
    Patch('Time sheet', Defaults('Time sheet'),
    {
    Title:User().FullName,Email:User().Email,
    'Date and Time':ThisRecord.DatePicker1.SelectedDate,
    Project:ThisRecord.Dropdown1.SelectedText,
    'Project Line':ThisRecord.Dropdown1_1.SelectedText,'Hours Type':ThisRecord.Dropdown1_2.Selected.Value,
    'Hours Type':ThisRecord.Dropdown1_2.Selected.Value,
    Hour:ThisRecord.TextInput1.Text,
    Description:ThisRecord.TextInput1_1.Text,
    'Manager Email Id':ThisRecord.TextInput1_2.Text,
    status:{Value:"Submitted"}

    }))

    Powerappsuser11_0-1691475127798.png

     

    I tried with various models still not achieve the requirement.Please Help to resolve the issue.

     

    Thanks for quick response.

  • v-mingkz-msft Profile Picture
    Microsoft Employee on at

    Hi @Powerappsuser11,

    There are some errors in your formula:

    1. Hour is a Number, you can replace formula with:

    Hour:Value(ThisRecord.TextInput1.Text)

    2. Project and Project Line are LookUp columns that expect record.

    Could you tell me the items of your dropdown?

    Maybe you can use the following formula:

    Project:{Id:ThisRecord.Dropdown1.Selected.ID,Value:ThisRecord.Dropdown1.Selected.Title}

    3. Id column is required in your list so you must add it.

     

     

    Best Regards,
    Kyrie

     

  • Powerappsuser11 Profile Picture
    237 on at

    Hi @v-mingkz-msft 

     

    Thanks for quick respond,

    I updated my code as per above model. Still getting errors.

    Id is added in sharepoint list.

    Project Dropdown-Items=Filter('Resource Assign','Resource Name'=User().Email)

    ProjectLine Dropdown-Items=Filter('Resource Assign','Project Name'=Dropdown1.SelectedText.'Project Name')

     

    My Code is onselect of Submit button in gallery rows.

     

    ForAll(Gallery2.AllItems,
    Patch('Time sheet', Defaults('Time sheet'),
    {
    Title:User().FullName,Email:User().Email,
    'Date and Time':ThisRecord.DatePicker1.SelectedDate,
    'Hours Type':ThisRecord.Dropdown1_2.SelectedText,
    Description:ThisRecord.TextInput1_1.Text,
    'Manager Email Id':ThisRecord.TextInput1_2.Text,
    status:{Value:"Submitted"},
    Project:
    {
    Id:ThisRecord.Dropdown1.Selected.ID,
    Value:ThisRecord.Dropdown1.Selected.'Project Name'
    },
    'Project Line':
    {
    Id:ThisRecord.Dropdown1_1.Selected.ID,
    Value:ThisRecord.Dropdown1_1.Selected.'Projectline Name'
    }
    }))

    Powerappsuser11_0-1691481188365.png

     

     

     

    I tried this many times  but it's not resolved  please help to close this requirement asap.

    Thanks in Advance For early response.

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 429 Most Valuable Professional

#2
11manish Profile Picture

11manish 191 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 122 Super User 2026 Season 2

Last 30 days Overall leaderboard