cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Glaga
Helper I
Helper I

Interconnected list patch (via search column on the site)

Hello,

I want to create a HR application for applications and open positions.

I create 3 lists:
1 / Posistions
2 / Candidates
3 / Application on positions
I was inspired by the model "My expense", so list 3 contains the following columns:
'ID_Positions': search for item in the list (1)
'ID_Candidates': search for item in the list (1)
'Status': Text

I want to create two forms that take the IDs of the selected elements.
That is to say when I am on a candidate, I wish to position it on a post that column 'ID_Candidates' takes again the ID of the candidate selected in the gallery_candidates.
And conversely when I'm in a Positions and I wish to add a candidate, I want the ID of the selected Postions to be the one of the form 'ID_Postions'.

I went on the following formula for my formulars:
Patch (Application on postions; {'ID_Positions': Text (cardvaluePOSITIONS.value); 'ID_Candidates': GalleryCANDIDATES.selected.ID;
'Status': "New"})

I think it's a syntax problem.

Can you help me ?

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

Thanks for your feedback! @yashag2255 @Jeff_Thorpe 

Thanks for the correction of the formula PATCH> Default

Unfortunately, the formula does not work, because you need a record type result for ID-Candidate or ID_Postition and I enter a result of type number ...

In short, I found a solution!
I changed my type of column in the SP, I have no more column type "search in the site", I always replace by type TEXT colones.

So my formula is now:
Patch ('Application on postions'; Defaults ('Application on postions'); {'ID_Positions': Text (cardvaluePOSITIONS.value); 'ID_Candidates': GalleryCANDIDATES.selected.ID;
"Status": "New"})

Thank U!

View solution in original post

4 REPLIES 4
Jeff_Thorpe
Super User
Super User

If you are trying to create a new record using Patch() then you are missing the second parameter.

 

Example of creating a new record: Patch('Application on postions'; Defaults('Application on postions'); {'ID_Positions': Text (cardvaluePOSITIONS.value); 'ID_Candidates': GalleryCANDIDATES.selected.ID; 'Status': "New"})



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
yashag2255
Dual Super User II
Dual Super User II

Hi @Glaga 

 

Can you share more details about the error that you are getting? Also, please describe more information about the application configuration?
 
Based on the description shared by you, in 'Application on positions' list, you have three text type columns and you want to fill in the selected Items for Candidate and Position.
 
If you are looking to create a new record, update the expression as:
Patch ('Application on postions'; Defaults('Application on postions');{'ID_Positions': Text (cardvaluePOSITIONS.value); 'ID_Candidates': GalleryCANDIDATES.selected.ID;
'Status': "New"})
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hello,

Thanks for your feedback! @yashag2255 @Jeff_Thorpe 

Thanks for the correction of the formula PATCH> Default

Unfortunately, the formula does not work, because you need a record type result for ID-Candidate or ID_Postition and I enter a result of type number ...

In short, I found a solution!
I changed my type of column in the SP, I have no more column type "search in the site", I always replace by type TEXT colones.

So my formula is now:
Patch ('Application on postions'; Defaults ('Application on postions'); {'ID_Positions': Text (cardvaluePOSITIONS.value); 'ID_Candidates': GalleryCANDIDATES.selected.ID;
"Status": "New"})

Thank U!

View solution in original post

yashag2255
Dual Super User II
Dual Super User II

Hey @Glaga 

 

Glad that you were able to resolve. If this issue is solved, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,004)