cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Draax
Level 8

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
Community Support Team
Community Support Team

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.
2 REPLIES 2
Community Support Team
Community Support Team

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.
Draax
Level 8

Re: Gallery input to forms

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

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 372 members 4,764 guests
Please welcome our newest community members: