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

lookup command not displaying the datasource fields

I have a master entry sharepoint list, and some columns which use a lookup to other sharepoint tables.

 

What I am trying to do is implement a workaround the to the lookup "bug" which doesn't allow me to display a second field associated to each entry, for example:

 

List Item 1

list description as shown in the lookup list

 

List Item 2

another description specific to the item.

 

My idea was to use a label box on my powerapps form to display the 'description' for the 'List Item', because currently, I cant select the description field in the value 2 property of the lookup/drop down control.

 

The code I am trying to use, when the dropdown list selection changes is:

tbDummy.Text=LookUp('Sub List',FIELD=Dropdown.selected.value,Description)

 

My dropdown list is the datacardvalue dropdown created by powerapps.

 

The problem I am having is the the FIELD in my "Sub List" is called Impact, or BusImpact (because I changed it and refreshed to see if it solved the problem) and I CAN'T get it displayed in the list of fields I can enter (you know how powerapps prompts you with the available fields and commands). I can see Description, and the other fields, as available fields.

 

Consequently I am trying to use "Title" as the FIELD name containing the data I am searching for. This is because my SubList has no title field.. because the only way I could remove it was to rename title to impact!

 

Is my sharepoint sub list broken... or am I missing something? What am I, or have I, done wrong!!!???

5 REPLIES 5
Community Support Team
Community Support Team

Re: lookup command not displaying the datasource fields

Hi adstar22,

 

Do you want to show the description for the Lookup column on app?

 

If yes, I am afraid that we are currently not able to get the value for this Description.

 

3.PNG

 

Please feel free reply if I misunderstand you.


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
adstar22
Level: Powered On

Re: lookup command not displaying the datasource fields

Your not quite correct.

 

Sub Table:

 

Impact | Description | Some other fields

--------------------------------------------------

Item 1 | Desc item 1 | xxxxxxx

Item 2 | Desc item 1 | xxxxxxx

 

The "Sub table" above is used as a lookup on my "master table", where the selected "Impact" is the stored value. You will note that "Description" refers specifically to another column in the table, and not a description of column 1. The description values will be specific to the items entered into the table.

 

In/On my powerapps I can display the impact in the drop down list. But, currently I am unable to display a 2nd Value as value 2 funcitonality isnt working. What I want to achieve is:

 

Drop down:

Item 1

Desc Item 1

Item 2

Desc Item 2

 

So, my work around was to display the description entry in a dummy text box. The content of which would be updated on change of the drop down. This will allow users to undertand what they have selected and make a change if nessecary.

 

The problem is either my lookup syntax.. or my sharepoint "sub table" because the "Impact" field is not available as a column heading in the lookup command, but the Title column no longer exists in my "sub table".

adstar22
Level: Powered On

Re: lookup command not displaying the datasource fields

As an update... I thought it be clever, and extract the sharepoint subtable as a context variable (internal table).

so when the screen is displayed: ClearCollect(cvBusImpacts,'IC Business Impacts')

 

NOW... I have an internal table with a TITLE column!

cvTable.JPGMy sub list imported into a collection

 

So, Now my code reads:

 

OnChange of the dropdown list called dcvBusImpact

 

tbBusImpact.Text=LookUp(cvBusImpacts,Title=dcvBusImpact.Selected.Value,Description)

 

tbBusImpact is my dummy text box, and I want to display the Description value which matches the selection made in the drop down.

 

Still.. I get nothing! but I have eliminated the issue with the sharepoint column names!

 

 

 

rlmckean
Level: Powered On

Re: lookup command not displaying the datasource fields

Hi Although I am not using Sharepoint look ups, I have had to try and work round them by doing the following.

As you have done, I created a collection CProgress from the lookup table 

On my main table, I  hold the IDnumber from the collection CProgress as a number in a field Progress.

On the view form I include the field 'Progress' which holds the relevant lookup ID number (datcardvalue33)

I add a textbox which overlays the Progress databox and set its Text property to LookUp(Cprogress,Text(ID)=DataCardValue33.Text,Title) - I thus have the Title text from the lookup table displayed

On the Edit screen I need a dropdown to edit the Field Progress with a drop down.

On the On Visible property of the screen I set a context Variable cprogtype and set its value either a default value for a new record, or Gallery.selected.progress when editing a record. . I set the default for Progress datacard value to  cprogtype as follows <default = Text(cprogtype)>

I create a drop down that overlays Progress datacard as above and  set Items property as Cprogress.Title.

Lastly on the ON Change event of the drop down I reset the context variable cprogtype

UpdateContext({cprogtype:LookUp(Cprogress,Title=Dropdown1.Selected.Title,ID)})

It works!

I cannot understand how Powerapps does not have this basic requirement included in its coding

Cheers

 

Richard

 

Highlighted
adstar22
Level: Powered On

Re: lookup command not displaying the datasource fields

I have worked out how to make my work around work!

 

For some reason (probably to do with the lookup field being a "result" and not an entry) which I don't fully understand, the On Change command didn't work in the drop down/lookup field properties.

 

BUT... the same command DOES work in the label text field:

 

LookUp(cvBusImpacts,Title=dcvBusImpact.Selected.Value,Description)

 

So, I kept my context variable table, because it worked faster than referring to the external sharepoint table. But now when I select something in the lookup/drop down field, the description from my lookup table is displayed.

 

This doesn't resolve the actual issue.. that powerapps offers the ability to display multiple values in a lookup/drop down.. but ONLY ID and data type can be selected!

 

 

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

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