cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Kudo Kingpin
Kudo Kingpin

Lookup and share Point List

Hi There,

 

Silly question here:

 

I have 2 SPL:

 

1. Country

ID   |  title   | Co_Code

 

2. Orders

 

ID | Title  | Consecutive |  Category  |  Country_ID

 

Country_ID is a lookup

 

for some reason I can not either ADD that field to my EditForm

and also in my gallery I would like to see the country name instead of the ID.

 

Could anyone point me in the right direction?

 

Thank you kindly

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @sajarac ,

Yes, I can totally get your point.

My workaround post above should work for your case, but I made a mistake, since I thought the CountryID column is bound to the ID column of Country list, but I just found it is bound to CoO_Code column.

I just need to modify the DataCard.Update property from 

{Id: DataCardValueName.Selected.ID,Value:DataCardValueName.Selected.ID}

to

{Id: DataCardValueName.Selected.ID,Value:DataCardValueName.Selected.'CoO_Code'}

 

 

Steps:

1. Unlock the CountryID DataCard,

2. Modify the Combobox.Items property: Country, select the Primary Field to Title.

3. Modify the DataCard.Update property: {Id: DataCardValueName.Selected.ID,Value:DataCardValueName.Selected.'CoO_Code'}

Then, this part should work properly. If you select a country in the form, the corresponding CoO_Code will also be patched to CountryID column.

Hope this helps.
Sik

View solution in original post

Hi @sajarac ,

 

Yes, you need to modify the DefaultSelectedItems of  DataCardValue14 property in CountryID datacard as follows:

LookUp(Country,ID=ThisItem.CountryID.Id)

Hope this helps.

Sik

View solution in original post

6 REPLIES 6
v-siky-msft
Community Support
Community Support

Hi @sajarac ,

 

Does the lookup column Country_ID link to ID column of Country list?

Do you mean you want dropdown in EditForm display the Title Field of Country list?

If so, please refer to the following steps.

1.Unlock the DataCard,

2. Modify the Combobox.Items property: Country, select the Primary Field to Title.

3. Modify the DataCard.Update property: {Id: DataCardValueName.Selected.ID,Value:DataCardValueName.Selected.ID}

 

If you want to show the Country Title in Gallery, please try this:

LookUp(Country,ID= ThisItem.'Country_ID'.Id).Title

Hope this helps.

Sik

Hi, thank you very much for your response, however I can't get this part working for my app. Let me explain a little bit my scenario:

 

I have a SPL : "Country"

Country.PNGCountry_Properties.PNG

Easy list, nothing complicated, now in my app I have connected two lists " Country" and "orders"

 

Orders.PNGOrders_Settings.PNGOrdersCountryLookup.PNG

 

In my app the fields looks like this:

 

MainScreen.png

 

Now the question is:

I am to be able to change country, if I put the form in "EditMode" I want to see a dropdown with the options once I select a different choice the new ID should be saved in the Orders list column "CountryID" 

 

Make sense or I am totally wrong?

 

Thanks for your advice

 

 

Hi @sajarac ,

Yes, I can totally get your point.

My workaround post above should work for your case, but I made a mistake, since I thought the CountryID column is bound to the ID column of Country list, but I just found it is bound to CoO_Code column.

I just need to modify the DataCard.Update property from 

{Id: DataCardValueName.Selected.ID,Value:DataCardValueName.Selected.ID}

to

{Id: DataCardValueName.Selected.ID,Value:DataCardValueName.Selected.'CoO_Code'}

 

 

Steps:

1. Unlock the CountryID DataCard,

2. Modify the Combobox.Items property: Country, select the Primary Field to Title.

3. Modify the DataCard.Update property: {Id: DataCardValueName.Selected.ID,Value:DataCardValueName.Selected.'CoO_Code'}

Then, this part should work properly. If you select a country in the form, the corresponding CoO_Code will also be patched to CountryID column.

Hope this helps.
Sik

View solution in original post

Good morning and thank you very much for your interest trying to help me with this:

 

I have been playing with different combinations of your formula but nothing works.

 

Any idea what I am doing wrong?

 

Thank you kindly

 

Picture1.png

Hi!

Almost done, I did some changes and is saving the value selected in my table orders.

What is not doing is:

form in view mode I see Country:ID

Form in Edit Mode: I see the countries list but not the actual value

 

Datacard update : {Id: DataCardValue14.Selected.ID,Value:DataCardValue14.Selected.CoO_Code}

 

viewmode.PNGeditmode1.PNGeditmode2.PNG

 

Sorry to be a pain, but is almost done

Hi @sajarac ,

 

Yes, you need to modify the DefaultSelectedItems of  DataCardValue14 property in CountryID datacard as follows:

LookUp(Country,ID=ThisItem.CountryID.Id)

Hope this helps.

Sik

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (3,291)