Jump to content

How to get check and unchecked filter dynamically


gurusai sankar

Recommended Posts

Hi All,

i have the data like Resource pool and Resource pool _ enabled flag column, Resource pool _ Gtcflag

Resource pool _ enabled flag column contans that data Y & N. (Y= Active pools , N = Inactive pools ) & Resource pool _ Gtcflag column containsthat data Y & N. (Y= GTCpools , N = Non Gtc pools)

requirement is

I should create a check box filter which includes Active pools & GTC pools and should satisfy all below conditions.

Scenario:

1. If active pool is selected.. then should show only active pools (Y -Resource pool _ enabled flag)

2. If active pool is not selected.. then should show all the pools(Y+N-Resource pool _ enabled flag)

3. If GTC selected .. should show only Gtc pools (Y-Resource pool _ Gtcflag)

4.. If GTC not selected .. should show all the pools(Y +N -Resource pool _ Gtcflag)

5. The two filters should work together.. means is active is selected and GTC is selected.... show GTC active pools

6. If Active is not selected and GTC not selected .. show all pools active and inactive. (All of Both)

 

Note : selected and not selected means- checked and unchecled the filter

Kindly help on this. how should i craete calacuated columns or script which is required for this.

Iappreaciate your help.

 

Thanks in Advance,

Guru

Link to comment
Share on other sites

- You can create a multi select lisbox property control with "None" alternative included say ActiveList1

- Create calculated column say Val with the logic you want like below (4 conditions considered - when nothing is selected, when active pools selected, when gtc pools selected and when both selected):

case when "${ActiveList1}"="" then 1=1 when "${ActiveList1}"="Active Pools" then [RESOURCE_POOL_ENABLED_FLAG]="Y" when "${ActiveList1}"="GTC Pools" then [RESOURCE_POOL_GTC_FLAG]="Y" when "${ActiveList1}" = "Active Pools, GTC Pools" then [RESOURCE_POOL_ENABLED_FLAG]="Y" and [RESOURCE_POOL_GTC_FLAG]="Y" end- Make sure Val value is always selected to True. This can be done by manually selecting it to True and hiding that filter or running iron python script to trigger on change ofActiveList1 property

https://community.spotfire.com/wiki/how-get-or-set-specific-filter-using-ir...

Attached dxp for reference

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...