cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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.
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

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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (105,813)