Querying a Custom Property for an Action

(imported topic written by Charles.Madison91)

Hi, I’ve been beating my head against the wall trying to do this, and I foresee it being fairly simply(in theory), but I just have not gotten any positive results. I’m running BES 8

I’ve create a custom property which queries my Client’s AD OU from the registry. I also have a different relay affiliation group for each OU.

I am trying to create a dynamic action script which will set the affiliation seek list to “{Custom Property variable},static value,catch all failover”

I can create a long string of IF/Then statements, but I would like to set something more dynamic.

Is this possible? Can I get some guidance on using a custom property in an action script? Am I making this too complicated?

(imported comment written by SystemAdmin)

Due to the fact you’re trying to parse something that could have a wide variety of permutations, this might be a bit awkward to try to do directly as a single, dynamic relevance, but generally it is achieveable.

First thing is, when dealing with clients, forget about your Properties. Retrieved and Analysis properties exist as part of the console and not something your clients know about. Therefore, you must take the relevance that you use in your custom property and use it as part of your dynamic relevance.

Secondly, you might need to construct the relevance to create the entire output string, rather than try to combine a relevance command and the additional elements. (This might not be a problem, but I certainly find it a bit more straightforward/cleaner to just create the output in the relevance.)

Lastly, although it might be a bit ‘ugly’, your relays and client couldn’t care less what the seek list keywords are going to be, so if you can avoid having to do a conversion (if x then a else if y then a else if z then b else c), I would do so. Thus the keywords would end up being the data pulled from the AD string (x, y and z) rather than your preferred keywords (a, b or c).

You can set up your relays to allow multiple types of AD OU elements, as they will still match even if they are far down the list. So a relay that might handle a chunk of OU types, might have an affiliation list of "x;y;z;static;

" and another one might be "q;r;s;t;u;v;w;x;static;

", assuming that clients with ‘x’ can land on either one.

So, to get the output, you would have something like the following relevance and use {} to wrap around it when you place it in the seek list (Note: be aware there is a legacy length limit which may still exist):

{ (it &";static value;catch all;*") of (relevance to pull the AD OU data) }

Worst case, if your AD relevance is too complex, you can have a task that will create a setting on the client (based on AD OU and adding in the static and catchall values) and then use a simple relevance to pull out the setting in the dynamic relevance for the field.

-Jim

(imported comment written by Charles.Madison91)

Thanks for the quick response, and like I said I was probably getting too complicated. My AD OUs are labeled the exact same as my affiliations, so at least I’m not doing any conversions, becuase I agree that would get really ugly.

Would it be reasonable to just have the Action set the value to “Setting X,static,static” with a simple relevance (if that setting exists)

I’m getting stuck (and I apologize for my amateur knowledge) on how I can actually set the action itself to get that value, and append it to the static value. Does this make sense?

It is possible that I don’t have a thorough understanding of terms, etc. So I don’t want to waste too much of anyone’s time on this.

-Charles