cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Returning information from a specific entry in SharePoint

Hello,

 

I am trying to create a label that is visible only if Today() falls within a start and end date stored in a SharePoint List entry. I cannot figure out how to do get the specific index instead of the whole column when typing the formula.

 

In this case I want to write an if statement that first looks for the user's name in the title column of the SharePoint and then if that is located look at the dates for that entry to see if today falls between them. How would I do this?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
K-A-R-L
Solution Specialist
Solution Specialist

Hi @Anonymous ,


Have you tried @Jeff_Thorpe  solution yet?

Try using and edit the codes below.

On your Label set the Visibilty Property to:

 

If(CountRows(
Filter(MyCalendarEvents,
Name.Text = "John Doe" //Name.Text is the name of the field on PA
&& Week_x0020_Start_x0020_Date >= Today() - Weekday(_dateSelected, StartOfWeek.MondayZero) //This will exclude weekends - Week_x0020_Start_x0020_Date  is my StartDate on SP List
&& Week_x0020_End_x0020_Date <= Today() +5 - Weekday(Today(), StartOfWeek.MondayZero) )) >= 1, //This will exclude weekends Week_x0020_End_x0020_Date  is my EndtDate on SP List
true,false)

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Jeff_Thorpe
Super User
Super User

You could use the Lookup() to see if the record exists.

 

LookUp function in PowerApps



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
K-A-R-L
Solution Specialist
Solution Specialist

Hi @Anonymous ,


Have you tried @Jeff_Thorpe  solution yet?

Try using and edit the codes below.

On your Label set the Visibilty Property to:

 

If(CountRows(
Filter(MyCalendarEvents,
Name.Text = "John Doe" //Name.Text is the name of the field on PA
&& Week_x0020_Start_x0020_Date >= Today() - Weekday(_dateSelected, StartOfWeek.MondayZero) //This will exclude weekends - Week_x0020_Start_x0020_Date  is my StartDate on SP List
&& Week_x0020_End_x0020_Date <= Today() +5 - Weekday(Today(), StartOfWeek.MondayZero) )) >= 1, //This will exclude weekends Week_x0020_End_x0020_Date  is my EndtDate on SP List
true,false)

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (4,439)