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

Create a new item based on selected Item

Hi!

 

I have a sharepoint list shared in powerapps with several items which dynamically reflect the most important things my users have to check. 

 

PApps1.PNG

 

 The backoffice SP List looks like this

PApps2.PNG

 

When they carry out a check, the user has to create a new item (Domain - Topic to check - Status - Remark - Date - Inspector), by clicking on the choosen item of the first screen.

 

My idea was to help them by pre-setting several fields. Date and Inspector are OK but I would like to get "domain", "question ID" and "Question text" from them item of the list they select before carrying out their control. Quite stuck on this one. Any idea ? 

 

Draft screen could be something like this (with QuestionID / Domain / Question text already filled), and user having to select the status and adding commentary / actions if necessary before saving their new item with the "Valid" button

 

 PApps3.PNG

Thanks !

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Create a new item based on selected Item

Hi @JesSDP,

Do you want to pre-populate Draft screen (second screenshot) with values from the selected item in your Gallery (in first screen)?

Based on the needs that you mentioned, I think the global variable could achieve your needs.

I have made a test on my side, please take a try with the following workaround:

Add the following formula within the OnSelect property of the "Carray Out" button within your Gallery (in your first screen):

Set(CurrentSelectedItem, ThisItem)

Note: I assume that you click the "Carray out" button to navigate to/pop-up the Draft screen. 

Then within your Draft screen, if you want to reference the  QuestionID / Domain / Question text column, please take a try with the following formula:

CurrentSelectedItem.'Question ID'
CurrentSelectedItem.'Domain'
CurrentSelectedItem.'Question'

 

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

6 REPLIES 6
Highlighted

Re: Create a new item based on selected Item

Can you maybe add some screenhots of the screens in your app and some more info about the used lists?
Highlighted
Frequent Visitor

Re: Create a new item based on selected Item

Hi @Rebetcha, thanks for your answer, I've updated my first post with some screenshots 🙂

Highlighted
Community Support
Community Support

Re: Create a new item based on selected Item

Hi @JesSDP,

Do you want to pre-populate Draft screen (second screenshot) with values from the selected item in your Gallery (in first screen)?

Based on the needs that you mentioned, I think the global variable could achieve your needs.

I have made a test on my side, please take a try with the following workaround:

Add the following formula within the OnSelect property of the "Carray Out" button within your Gallery (in your first screen):

Set(CurrentSelectedItem, ThisItem)

Note: I assume that you click the "Carray out" button to navigate to/pop-up the Draft screen. 

Then within your Draft screen, if you want to reference the  QuestionID / Domain / Question text column, please take a try with the following formula:

CurrentSelectedItem.'Question ID'
CurrentSelectedItem.'Domain'
CurrentSelectedItem.'Question'

 

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

Re: Create a new item based on selected Item

Hi JesSDP and v-xida-msft, In this case I think you do not need to use a variable, because the gallery already provides the necessary information through the Gallery.Selected.fieldname reference. The last selected item of a gallery is stored in the memory of the app similar to a variable.
Highlighted
Frequent Visitor

Re: Create a new item based on selected Item

t

Highlighted
Frequent Visitor

Re: Create a new item based on selected Item

It worked fine for me, thanks !

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,850)