cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

ThisItem statement not pulling through

I have a label that has this statement "Notes: " & Thisitem.AdditionalItems It doesn't give me a red x so it works and the notes appears but nothing pulls through. Has anyone seen this by chance?Excel_OneDrive.JPGThisitemstatement.JPG

15 REPLIES 15
Highlighted
Super User
Super User

Re: ThisItem statement not pulling through

 

I assume you are using a ThisItem to get the computer and dock names so it is working for other entities, right? You could look at the collection to verify that the 'AdditionalItems' column is there and maybe try an alternative approach like LookUp to see if that works. 

 

I have encountered times when the ThisItem was in an error state but it didn't show the error, usually when I copied a gallery from somewhere and remapped the data source but forgot to change some of the references.

Highlighted
Helper I
Helper I

Re: ThisItem statement not pulling through

What would a lookup statement look like?

Highlighted
Super User
Super User

Re: ThisItem statement not pulling through

Since it looks like you are working in Excel, using the computer/dock name would be best I would think (as opposed to an ID or something like that). Assuming the Excel file is named ComputerList, the column with the computer and dock items is named Computers, and the text box with the computer/dock name in your gallery is named ComputerTextBox, the LookUp would look like:

 

LookUp(
     ComputerList,
     Computers = ComputerTextBox.Text,
     AdditionalItems
)

 

 

Highlighted
Super User
Super User

Re: ThisItem statement not pulling through

I forgot the Notes text. It would look like this with that included:

"Notes: " &
LookUp(
     ComputerList,
     Computers = ComputerTextBox.Text,
     AdditionalItems
)

 

 

Highlighted
Helper I
Helper I

Re: ThisItem statement not pulling through

"Notes: " & LookUp(Devices,AdditionalItems = DeviceGallery,selected.additionalitems

 

 

The actual gallery I have everything displayed in is 'DeviceGallery'

 

The column for the item is 'additionalitems'

 

The doc (On OneDrive) is Device-Order-Data

 

The tab on the doc is Devices

 

 

Super User
Super User

Re: ThisItem statement not pulling through

Your formula is close but needs some adjusting.

 

Let me put an explanation of the LookUp function in. The syntax is like this: 


LookUp(Table, Formula, Column to Display From).

 

The Table would be your data source, which from what you said should be Devices.

 

The Formula is a comparison of two items and can be explicit, like Flavor = "Chocolate", or part of a reference, which is what we are doing. So, we would need the name of the column (from the Devices table) that has the "HP Elitebook 350 G3", etc. in it and then the name of the label in DeviceGallery that has that text in it. I attached a screenshot below to hopefully help with that explanation. So if the column where the "HP Elitebook 350 G3" and other items are found is called DeviceName, and the label in the gallery where that text is displayed is called DeviceNameText, it would be DeviceName = DeviceNameText.Text. 

 

The Column to Display From is the column that you want to display the corresponding value from. In your case, it sounds like additionalitems should be what you need. You don't need the Selected in there, just the column name. 

 

In my example below, my data source is a table named Table1 from an Excel file named ScheduleTestData. The label with "136" in it has the formula ThisItem.EmployeeID in the Text field and is named Label3. I want to look up what is in the Location column based on whatever text is in Label3 by comparing it to the EmployeeID column in Table1.

 

2018-08-02(1).jpg

 

Hopefully that helps a bit. So, we need the column name and label name where "HP Elitebook 350 G3" is to complete the LookUp.

Highlighted
Helper I
Helper I

Re: ThisItem statement not pulling through

I am sorry. For some reason it is not clicking. 

I am getting closer, here is my formula I built

 

LookUp(Devices, Title = Label5_1,Text(AdditionalItems)

 

 

The actual gallery I have everything displayed in is 'DeviceGallery'

 

The column for the item is 'additionalitems'

 

Column for 850 g3 is 'title'

 

Label name for computer name is 'Label5_1'

 

The doc (On OneDrive) is Device-Order-Data

 

The tab on the doc is Devices

Highlighted
Super User
Super User

Re: ThisItem statement not pulling through

No worries! Your formula is pretty much there aside from one change. Make it: 

 

LookUp(Devices, Title = Label5_1, AdditionalItems)

 

That should work but if not, we'll keep at it until we get there. 

Highlighted
Helper I
Helper I

Re: ThisItem statement not pulling through

No Dice... but I was close I attempted that one above. It is giving me an invalid argument error. Thanks again

 

Here is the Table

Capture.JPG

 

 

Here is my gallery

Gallery.JPG

 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (5,489)