web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Query SharePoint list,...
Power Apps
Unanswered

Query SharePoint list, return column value in label

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I'm attempting to return a numeric value in a label from a lookup against a SharePoint list where 2 conditions are true. The conditions are set from values selected within a form.

 

frm1.dropdown1

OnChange - Set(var_BuildingSelected, ThisItem.BuildingName)

 

frm1.datepicker1

OnChange - Set(var_DateSelected, ThisItem)

 

Label1

"Availability is " & LookUp(Building,Text(DataCardValue5.SelectedDate,"[dd/mm/yyyy") = Building.BookingDate && var_BuildingSelected = Building.BuildingName, Spaces)

or 

"Availability is " & LookUp(Building, var_DateSelected = Building.BookingDate && var_BuildingSelected = Building.BuildingName, Spaces)

 

Spaces is a calculated numeric value within the list.

 

Thanks in advance 🙂

Categories:
I have the same question (0)
  • RMPCoe Profile Picture
    4 on at

    OK, I'm getting close;

     

    Currently stuck on;

    Text(LookUp('Building', BuildingName = Dropdown1.SelectedText.BuildingName && BookingDate = DataCardValue5.SelectedDate,BuildingMaxCapacity))

     

    This works, however the && does not

    Text(LookUp('Building 1', BuildingName = Dropdown1.SelectedText.BuildingName ,BuildingMaxCapacity))

  • RMPCoe Profile Picture
    4 on at
    Text(LookUp(
     'Building',
     Text(Dropdown1.SelectedText.BuildingName) && Text(DataCardValue5.SelectedDate,"dd/mm/yyy"),
     BuildingMaxCapacity
    ))

    I have also tried this format, however still unable to get the && to function correctly

  • Preachman85 Profile Picture
    38 on at

    Anyone? Is the issue so easy that noone cares to answer, or can it simply not be done?

  • WarrenBelz Profile Picture
    156,382 Most Valuable Professional on at

    Hi @Preachman85 ,'

    Firstly you are missing the field you are comparing the text string to - I will use YourField below. I am assuming you want to concatenate two values to form a text string that references a field in the list. 

    With(
     {
     vQuery: 
     Dropdown1.Selected.BuildingName &
     Text(
     DataCardValue5.SelectedDate,
     "[$-en]dd/mm/yyyy"
     )
     },
     LookUp(
     'Building',
     YourField = vQuery,
     BuildingMaxCapacity
     )
    )

     Just a tip for the future - I think the main reason for lack of response was the lack of understanding of your question.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • WarrenBelz Profile Picture
    156,382 Most Valuable Professional on at

    Hi @Preachman85 ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard