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 / If Lookup on multiple ...
Power Apps
Answered

If Lookup on multiple columns

(0) ShareShare
ReportReport
Posted on by 209

I would really appreciate some help.

I have a table in SQL DB with a FLE_Name column which is varchar and FLE_Date column which is datetime.

There is mulitple values in FLE_Name (Yoda, R2D2, Hans, ETC) and multiple dates in FLE_Date column.

I am trying to do an If(Lookup(.. on this table.

I want to return true if FLE_Name = Yoda and FLE_Date is today`s date.

This will be in the "Visible" properties of a button.

So that if a record for Yoda with today`s date is present, the If will do the True.

Anyone have any idea how I could do this?

Categories:
  • Verified answer
    timl Profile Picture
    37,409 Super User 2026 Season 2 on at

    Hi @kevinsray

    You should be able to do this by setting the Visible property of your button to the following formula:

    (CountIf('[dbo].[YourTable]', FLE_Date = Today() && FLE_Name="Yoda") = 0)

    This formula will resolve to true when FLE_Name = Yoda and FLE_Date = Todays date.

    Note that if Today() returns the current date with a time element of midnight. Therefore, it'll match only those records in your table where the time element of FLE_Date is also midnight.

  • kevinsray Profile Picture
    209 on at

    Thank you for this feedback.

    How could I modify this so that it checks the datetime stamp for any time during a day.

    As some of the datetime stamps may be morning, while others may be afternoon.

  • Verified answer
    kevinsray Profile Picture
    209 on at

    Hey Mate,

    Did some more work on this and was able to get it working as I want.

    This is the code I ended up with in the Visible property.

     

    (CountIf('[dbo].[WHS_FL_EL]', Text(DateAdd(FLE_Date,-0,Hours),"[$-en-US]dd/mm/yyyy") = Text(Today()) && FLE_Name="Yoda") = 0)

     

    Thank you so much for the pointer.

    Now I have another function I sort of know how to use. 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard