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

Filter using IF and Filter Name (Person) and Week

Hello All,

 

Can someone help me how to insert a filter for Person (input Text) here and Week (Dropdown) in this Gallery formula below:

 

If(
FilterTheList,
Filter(
'CSA 2022 STANDBY LIST',
'WEEK 2022'.Value = "WEEK " & varWeekNumber
),
'CSA 2022 STANDBY LIST'
)

 

Note:

Column Name for Person Name:

'CSA Voice'

'CSA Intl'

 

Column Name for Week:

'Week 2022'

 

Really appreciate your help

asuhaimi_0-1645939976965.png

Regards

asuhaimi

2 REPLIES 2
RandyHayes
Super User
Super User

@asuhaimi 

There are some unknowns about your scenario that you have not made clear.

1) What column has the user name in it - 'CSA Voice' or 'CSA Intl'?

2) What type of column is the user name column - text or a person column?

3) What is the dropdown for the weeknumber?  And, what is the Items property of that dropdown?

4) What is varWeekNumber?

5) What is FilterTheList?

 

However, in general, your formula should be something along this line:

Filter('CSA 2022 STANDBY LIST',
    FilterTheList ||
    (
       ('WEEK 2022'.Value = "WEEK " & varWeekNumber) &&
       ('CSA Voice' = TextInputX.Text ||
        'CSA Intl' = TextInputX.Text )
    )
)

Not sure where the dropdown fits in based on my questions above, so it is not included above.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
asuhaimi
Helper II
Helper II

Hi @RandyHayes 

 

Sorry for the unclear information's. Below my answered..

 

1) What column has the user name in it - 'CSA Voice' or 'CSA Intl'?

'CSA Voice' or 'CSA Intl' are the Column names, inside of it is people/individual name.

2) What type of column is the user name column - text or a person column?

Person Column

3) What is the dropdown for the weeknumber?  And, what is the Items property of that dropdown?

dropdown for weeknumber property is drpStandbyList and the items represent as WEEK01, WEEK02, WEEK03....... and the column name is 'WEEK 2022'

4) What is varWeekNumber?

It used to select specific WEEK when click button for current week.

5) What is FilterTheList?

Filtered for specific current week

 

IF condition is used for selection current week (Filtered list). I've tried my formula here but not working as below.. actually I need the IF fn combination for filter current week and filter dropdown and filter textinput:

 

Filter('CSA 2022 STANDBY LIST',('WEEK 2022'.Value=drpStandbyList.Selected.Value || drpStandbyList.Selected.Value=Blank()) &&
StartsWith('CSA VOICE'.DisplayName,txtPICStandbyList.Text) || StartsWith('CSA INTL'.DisplayName,txtPICStandbyList.Text) ||
StartsWith('CSA VAS CORE - A'.DisplayName,txtPICStandbyList.Text) || StartsWith('CSA VAS CORE - B'.DisplayName,txtPICStandbyList.Text) ||
StartsWith('IP CORE'.DisplayName,txtPICStandbyList.Text) || StartsWith('PS CORE'.DisplayName,txtPICStandbyList.Text))

 

Hope you can help me.

 

Regards

asuhaimi

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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