cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Gallery input to forms

Hi,

 

I'm trying to make an app for the janitors of my company to deal with the amount of packages being delivered to the office.

 

I've made a gallery who uses this function:  Filter(Office365Users.SearchUser({searchTerm:txtinputemployee.Text,top:10}),AccountEnabled=true)

 

With this function, I can search for users, usernames, department, and email addresses.

 

I have some pictures of the local shipping agents, once pressed it sets a variable so the header of the email says "Package from [Shipping agent]"

 

The email looks just like I want it but the janitors have requested some sort of tracking system where they can see how many packages this department received in November.

 

Only thing I can come up with is a form where it submits the input information to a Sharepoint list.

I can't find a way to submit the selected gallery information and variables to the list without using only a form which then limits so that I cant use my gallery where all the necessary user info are.

 

Maybe there's a better way to build it?

Thanks for all input Smiley Happy.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Gallery input to forms

Hi @Draax

Could you please share a bit more about your scenario?

Do you want to submit your selected Gallery item and variables (Shipping agent name) into a SP list?

If you want to submit your selected Gallery item and variables (Shipping agent name) into a SP list, I think it is not necessary to add a Edit form within your app.

Based on the needs that you provided, I think Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the Items property of the Gallery control (Gallery1) to following:

Filter(Office365Users.SearchUser({searchTerm:txtinputemployee.Text,top:10}), AccountEnabled=true)

Set the OnSelect property of the "Submit" button to following:

Patch(
   'YourSPList',
    Defaults('YourSPList'),
    {
      EmployeeName: Gallery1.Selected.DisplayName,
      Email: Gallery1.Selected.Mail,
      Department: Gallery1.Selected.Department,
      ShippingAgentName: VariableName,         /* <-- VariableName represents the variable you set within your app*/
      ...
    }
)

Note: The EmployeeName, Email, Department and ShippingAgentName represent the columns within your SP list.

More details about submitting data into SP list using Patch function, please check the following video:

https://www.youtube.com/watch?v=Vqu1S-_z2xM

More details about the Patch function, please check the following article:

Patch function

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Gallery input to forms

Hi @Draax

Could you please share a bit more about your scenario?

Do you want to submit your selected Gallery item and variables (Shipping agent name) into a SP list?

If you want to submit your selected Gallery item and variables (Shipping agent name) into a SP list, I think it is not necessary to add a Edit form within your app.

Based on the needs that you provided, I think Patch function could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the Items property of the Gallery control (Gallery1) to following:

Filter(Office365Users.SearchUser({searchTerm:txtinputemployee.Text,top:10}), AccountEnabled=true)

Set the OnSelect property of the "Submit" button to following:

Patch(
   'YourSPList',
    Defaults('YourSPList'),
    {
      EmployeeName: Gallery1.Selected.DisplayName,
      Email: Gallery1.Selected.Mail,
      Department: Gallery1.Selected.Department,
      ShippingAgentName: VariableName,         /* <-- VariableName represents the variable you set within your app*/
      ...
    }
)

Note: The EmployeeName, Email, Department and ShippingAgentName represent the columns within your SP list.

More details about submitting data into SP list using Patch function, please check the following video:

https://www.youtube.com/watch?v=Vqu1S-_z2xM

More details about the Patch function, please check the following article:

Patch function

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Resolver I
Resolver I

Re: Gallery input to forms

Thanks, that's what I've been missing!
Have a great day

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,714)