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 / SWITCH linked to Share...
Power Apps
Answered

SWITCH linked to Sharepoint List

(0) ShareShare
ReportReport
Posted on by 643

I have a Daily check that is conducted using the App. This is then recorded in a SP list. I'd tlike to have Circles on the main page which switch depending on wether or not the check had been conducted on that day for a particular machine.

 

Circle IS red if not entry for Machine 1 is found on 26/04/2023 and the opposite, turning green if there is one.

 

Is this possible as i cant see how i can link SP to switch. I have added a gallery with the entries which filters based upon a date picker and thatw roks showing an entry, so ithough perhaps i could hide these gallerys and have the circle switch based upon the value in a galeery instead if i cannot directlylink to sn SP list.

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @jamescosten,

     

    To check whether a daily check has been made, you can use a LookUp() and If() in the Fill property of the Circle control to show the color dynamically. Below you can find a sketch of the code - adjust where necessary:

    If(
     IsBlank(
     LookUp(
     listName, //Change to the correct list
     DateField = Today() //Change DateField to the correct date column in you SP list
     )
     ),
     Color.Red,
     Color.Green
    )

    Make sure the column is a Date column, not DateTime. Should it be a DateTime field try:

     

    If(
     IsBlank(
     With(
     {endOfDay: Today() + Time(23,59,59)},
     LookUp(
     listName, //Adjust list name
     DateTimeField >= Today() && DateTimeField <= endOfDay //Adjust DateTimeField
     )
     )
     ),
     Color.Red,
     Color.Green
    )

    You can add extra filter conditions with && to e.g. include a specific machine type.

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • jamescosten Profile Picture
    643 on at

    Tnhak you for your prompt response. I have entered it in and it retunrs a true value despite there being no entry in the SP List. When i add my && expression from a column value it breaks fully withno error code just syas rewrite formula.

     

    jamescosten_0-1682510693379.png

     

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @jamescosten,

     

    The IsBlank will return true if no value is found (LookUp record is blank) - resulting in the color red. To add a choice column, we will need to extend the column name with .Value in order to compare it to text (if it is a single selection choice column):

     

    If(
     IsBlank(
     With(
     {endOfDay: Today() + Time(23,59,59)},
     LookUp(
     'Crane Daily Checks', 
     Created >= Today() && Created <= endOfDay && Crane.Value = "Tool Room"
     )
     )
     ),
     Color.Red,
     Color.Green
    )

     

    A multi-select choice column will be a bit more difficult since it would make our LookUp non-delegable. In order to fix this, we first filter by date and then apply the non-delegable choice column condition. As long as the output / returned records of the date filter function is less than your Data Row Limit (see app settings, max 2000), you should be fine.

     

    If(
     IsBlank(
     With(
     {endOfDay: Today() + Time(23,59,59)},
     LookUp( 
     Filter(
     'Crane Daily Checks', 
     Created >= Today() && Created <= endOfDay
     ),
     "Tool Room" in Crane.Value
     )
     ),
     Color.Red,
     Color.Green
    )

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard