How do I reference an access filter in a custom query on filter formatting?

Steve Voller shared this question 4 years ago
Answered

This is the error message:

This filter is dependent on another filter.

Your query should return these columns:

1 Access Filter: ValidSites2


2: Site Name


So my query needs to reference the access filter but how? Via an IN? Should I reference the access filter by name (ValidSItes2) or via the ReferenceId(s) the access filter returns?

I've tried all sorts of combinations without success and can't see any examples in the documentation....

Thanks in anticipation!

Replies (5)

photo
1

Hi Steve,

Can you advise if this a "Custom Query" in the Entry Style->Value List Setup?

Thanks,

Paul

photo
1

Hi Paul,

Yes it is please see attached. The simple query shown returns a number of rows. However, for this user there should be fewer rows returned when the access filter is used. I can't figure the syntax to use to reference the access filter within the custom query.


Thanks


Steve

photo
1

Hi Steve,


The query needs to return the field that the Access Filter "ValidSites2" refers to as well as the Site Name e.g:

"select af_sites, name from sites"


I hope that makes sense.

Thanks,

Paul

photo
1

Hi Paul,

I've added the id field to the custom query as this is the key value returned from the access filter. It works! So simple. I realise now that the two fields message wasn't an error it was for information purposes. I thought I needed to explicitly reference the access filter somehow but Yellowfin must make the connection automatically in the background.


There's still something slightly strange because while testing I removed the id, refreshed the cache and somehow it still returned the correct rows rather than all of them.

However, it's working so onwards and upwards. Thanks for your help; you can close the ticket now.

Regards

Steve

photo
1

Hi Steve,

I am glad it's working for you now. I will close this off as requested, but if you need anything else, please keep in touch.

Regards,

Paul

Leave a Comment
 
Attach a file