cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Create new entry to sharepoint list based on selections from other sharepoint list

Hi all

 

I want to be able to have an app that you select an option from 2 different lists and then it creates a new item on another lists that shows what that selection were (more detail below).

 

Is there a recommended template that I could update or does anyone have any suggestions on what to read/ watch to be able to pull this together?  

 

Thanks 

 

Terry 

 

i.e 

Step 1: start the app and it takes me to list A (Colour of the ball) 

Step 2: I select the colour of the ball from List A (that is stored on sharepoint i.e. Red, Blue, Yellow etc etc), following selection it takes me to List B

Step 2: I then select the size of the ball from List B (also a sharepoint list i.e. 1,2 ,3 etc) 

Step 3: It then collects this and creates a new entry on List C which shows:

  • Date of order 
  • Person submitting 
  • selection from List A
  • Selection from List B

 

2 REPLIES 2
Highlighted
Frequent Visitor

Re: Create new entry to sharepoint list based on selections from other sharepoint list

We were able to achieve this functionality using Patch.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch 

 

In our example we used a sharepoint online list named result list to store responses. 

you will need to post all the columns you need to populate in the result list in the patch statement 

an example of the Patch would be

Patch(ResultsList,Defaults(ResultsList),{Title: "TitleName",Column1:Dropdown1.SelectedText.Result, Column2:Dropdown2.SelectedText.PropertyID,TestDate:startDate.SelectedDate,....}) 

Note that the The dropdown lists were populated using a sharepoint list. 

Highlighted
Community Support
Community Support

Re: Create new entry to sharepoint list based on selections from other sharepoint list

Hi @Terryghill ,

 

What's the types of each column in these SP lists? Can you share them?

You can use Patch function to save the value to data source. For more information, please check this article: Patch function 

I have made a test on mu side, please refer to the following steps:

1. I assume the color, size columns are all choices, person submitting is Text column, Selection from list A/B is Text and Date of order is Date column.

2. Set Choices('List A'. Color) to Items property of color drop down, and set Choices('List B'. Size) to Items property of size dropdown.

3. Create a button to save the selection to List C, set OnSelect property as below:

 

Patch('List C', Defaults('List C'), {'Date of order ': Now(), 'Person submitting': User().FullName, 'selection from List A' : ColorDropDown.Selected.Value, 'selection from List B': SizeDropDown.Selected.Value })

 

 

The above steps are for your reference. The valid expression is due to the columns types of each list.

If something is not clear or you meet some error, please post back the error info screenshot. 

Best regards,
Sik

Helpful resources

Announcements
secondImage

New Return to Workplace

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

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

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 (3,381)