Variables in relevance

I’m wondering if it’s possible to use variables in relevance. I have multiple references to a baseline name (in a custom web report) and it would be nice to just modify it in one location.

thx!

1 Like

Better yet, can i reference a filter in a custom report? For example does Action–>Name have variables associated with them? So i could do something like this

bes actions whose (

exists multiple flag of it AND
name of it as lowercase contains “ACTION_NAME” as lowercase AND
state of it = “Open”

You can certainly use variables in a custom report. Reports can utilize various web technologies like HTML and Javascript, so you can make them quite complex and sophisticated. Though you may not need that for what you’re trying to do.

Filters also apply to custom reports, whether you are using the <?relevance ?> tag or the EvaluateRelevance() javascript function. So you can use general relevance like names of bes actions whose (multiple flag of it AND state of it = 'Open') and then apply a filter to it that limits the response further. So adding the filter for Action -> Name contains POLICY with change the relevance output to only include answers that also contain the word ‘POLICY’ in the name.

So in your example, you don’t need the ‘name of it’ check, but can use the filter to control that instead.

Thanks Steve. I’m trying to make use of the info you provided in a custom report shared at the master class in florida a few months back. Here is an excerpt of the original code. I’ve made multiple attempts to omit the ‘name of it’ check and use “names of bes actions whose (multiple flag of it AND state of it = ‘Open’)” but haven’t had any luck. I’m going to keep working at it but would appreciate further help. Thanks again!