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

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.

 


Accepted Solutions
Community Support Team Rank
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


All Replies
Community Support Team Rank
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

Draax
Level: Powered On

Re: Gallery input to forms

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