cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
loopingmurdock
Helper II
Helper II

Retrieve month from a sharePoint

Hello Guys.

 

Am trying to compare the month from a column in a sharePoint with PowerApps?

 

I have tried this:

If(!IsBlank(LookUp(Add_Expensive, DateOf = Month(Now()))), "Avaliable", "UnAvaliable")

Even if both month are 6 (June).

 

Add_Expensive = SharePoint Data.

DateOf = Column format date.

 

Thank you for your time.😉

2 ACCEPTED SOLUTIONS

Accepted Solutions
Ashwin7104
Super User
Super User

Hey @loopingmurdock ,

 

Please use the below formula since Month(column) is not delegable

If(
    !IsBlank(
        LookUp(
            Add_Expensive,
            DateOf  >= Date(
                Year(Now()),
                Month(Now()),
                1
            ) And DateOf < DateAdd(
                Date(
                    Year(Now()),
                    Month(Now()),
                    1
                ),
                1,
                Months
            )
        )
    ),
    "Avaliable",
    "UnAvaliable"
)

.
If this post helped you, 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.

 

View solution in original post

Hi @loopingmurdock ,

 

For using countrows,

 

1) replace LookUp with Filter function

2) Directly using Countrows will throw delegate issue. So assign the filtered records to a collection and then count the rows

 

Thanks.

View solution in original post

5 REPLIES 5
Ashwin7104
Super User
Super User

Hey @loopingmurdock ,

 

Please use the below formula since Month(column) is not delegable

If(
    !IsBlank(
        LookUp(
            Add_Expensive,
            DateOf  >= Date(
                Year(Now()),
                Month(Now()),
                1
            ) And DateOf < DateAdd(
                Date(
                    Year(Now()),
                    Month(Now()),
                    1
                ),
                1,
                Months
            )
        )
    ),
    "Avaliable",
    "UnAvaliable"
)

.
If this post helped you, 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.

 

loopingmurdock
Helper II
Helper II

Thanks, The code works perfect but don't understand the structure of the 1s.

To do a countRows() i just copy the code completely sorry to bother you?

Hey @loopingmurdock ,

 

First and second 1's mark the 1'st of every month like 1st June. The third 1's is used to add one month to the current month. 

Hi @loopingmurdock ,

 

For using countrows,

 

1) replace LookUp with Filter function

2) Directly using Countrows will throw delegate issue. So assign the filtered records to a collection and then count the rows

 

Thanks.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,951)