cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MartinHagara
Level: Powered On

Save collection to SharePoint (data type LookUp)

Hi,

Please give advice: I want to save my collection "LokalityLocal" to SharePoint List "Lokalita" using the formula:

 

ForAll(LokalityLocal; Patch(Lokalita;Defaults(Lokalita);{'Meno lokality': MenoLokality; Kód: Kod; 'GPS-N-Latitude': GPS_N_Latitude; 'GPS-E-Longitude': GPS_E_Longitude; 'Nadmorská výška': NadmorskaVyska; Poznámka: Poznamka; BiotopID_zApp: BiotopVyber; Biotop: { Id: LookUp(LokalityLocal; BiotopVyber = BiotopVyber; BiotopVyber); Value: BiotopVyber} }))

 

But in the "Biotope" column, it always saves only the first value of the "BiotopVyber" column in my collection "LokalityLocal" - as seen in the picture.
Can you help me edit the formula?
 
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Save collection to SharePoint (data type LookUp)

Hi @MartinHagara ,

Could you describe more clearly about this formula, especially the red part?

Biotop: { Id: LookUp(LokalityLocal; BiotopVyber = BiotopVyber; BiotopVyber); Value: BiotopVyber} }

What does BiotopVyber reprent? a field or a value?

If you means that the right one is a field in Lokalita, the left one is a field in LokalityLocal, then please try this:

ForAll(LokalityLocal; Patch(Lokalita;Defaults(Lokalita);{'Meno lokality': MenoLokality; 
Kód: Kod; 'GPS-N-Latitude': GPS_N_Latitude; 'GPS-E-Longitude': GPS_E_Longitude;
'Nadmorská výška': NadmorskaVyska; Poznámka: Poznamka; BiotopID_zApp: BiotopVyber;
Biotop: { Id: LookUp(LokalityLocal; BiotopVyber = LokalityLocal[@BiotopVyber]; BiotopVyber); Value: BiotopVyber} }))

//use [@] could avoid ambiguity

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

1 REPLY 1
Community Support Team
Community Support Team

Re: Save collection to SharePoint (data type LookUp)

Hi @MartinHagara ,

Could you describe more clearly about this formula, especially the red part?

Biotop: { Id: LookUp(LokalityLocal; BiotopVyber = BiotopVyber; BiotopVyber); Value: BiotopVyber} }

What does BiotopVyber reprent? a field or a value?

If you means that the right one is a field in Lokalita, the left one is a field in LokalityLocal, then please try this:

ForAll(LokalityLocal; Patch(Lokalita;Defaults(Lokalita);{'Meno lokality': MenoLokality; 
Kód: Kod; 'GPS-N-Latitude': GPS_N_Latitude; 'GPS-E-Longitude': GPS_E_Longitude;
'Nadmorská výška': NadmorskaVyska; Poznámka: Poznamka; BiotopID_zApp: BiotopVyber;
Biotop: { Id: LookUp(LokalityLocal; BiotopVyber = LokalityLocal[@BiotopVyber]; BiotopVyber); Value: BiotopVyber} }))

//use [@] could avoid ambiguity

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,071)