cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Glaga
Level: Power Up

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 ?

4 REPLIES 4
Super User
Super User

Re: Interconnected list patch (via search column on the site)

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.
Super User
Super User

Re: Interconnected list patch (via search column on the site)

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!
Glaga
Level: Power Up

Re: Interconnected list patch (via search column on the site)

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!

Super User
Super User

Re: Interconnected list patch (via search column on the site)

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
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 242 members 4,984 guests
Please welcome our newest community members: