Actionscript group membership

Hi,
I’m trying to get kind of true/false from checking group membership, using actionscript but I get an error:
evaluation error: This expression contained a character which is not allowed: line 1”:

this is my actionscript:

If {member of group 49 of sites}
dos mkdir c:\true
else
dos mkdir c:\false
endif

where am I wrong?

You need to specify what site that group ID is in so the client knows what site to check, eg

member of group 49 of sites whose (name of it = "yourcustomesite")

or

member of group 49 of sites "CustomSite_NameOfYourSite")

I don’t know your use case but you don’t need to run an action to tag systems, you could just use a property, or view the group membership using Web Reports which can query group membership data already evaluated by the client.

Thank you for your reply.
my use case is to install different apps based on group membership.
what should I write in name for Master site?
how is Mater site described in site name?

Are you deploying these apps via Bigfix fixlet? If so then you can target endpoints by their group membership by expanding “All Computers” then expand “By Group” and select your group from the list when deploying the fixlet.

If you look at the Computer groups, the name of the site will be visible, or you can get it by tag name using the relevance query

site tags of sites

I’m going to achieve it automatically.
I will create with my orchestrator some file in specific location.
I will create and endless action that will run only on computers that hsa this file in specific location.
therefore, as you can see this task will be automatic and not manually.
therefore I’m going to write an action in a task that will have these logic inside;
if computer is a member of a specific group, then 1 app will be deployed, if computer is a member in different group then it will deploy 2nd app.

I have 4 groups, then I need to have 4 conditions to achieve this action.

In the Fixlet Debugger, evaluating in “local client evaluation mode”, you should be able to query
names of sites
In client context, I believe the site you are looking for is ‘actionsite’, but I think you would be better served by placing your targeting groups into a custom site instead. The Master Action Site should be used as little as possible for efficiency purposes.

In case its something you can use, you can evaluate the groups and the site they are in that endpoint is a member of by running this using the “local client evaluation mode”.

Q: (values of headers "Subject" of relevant fixlets whose (value of header "X-Fixlet-Type" of it as lowercase = "computergroup") of it, name of it ) of sites
A: TestGroup1, TestSite1
A: TestGroup2, TestSite2
A: TestGroup3, actionsite
A: TestGroup4, actionsite
A: TestGroup5, actionsite

Groups can be in the “Master Action site”, aka “actionsite” or could be in a custom site if you use those in your environment.

I used it:
member of group 49 of sites whose (name of it = "actionsite") or member of group 49 of sites "actionsite")

but have the following issue:

“syntax error: unknown action command”

I think you have 1 closing ) too many, though you should only need 1 check

member of group 49 of sites "actionsite"

unfortunatelly it’s the same :frowning:

What is your action script? I tested it and it doesn’t error for me (of course I use a different group ID)

if{members of groups 1473 of sites "actionsite"} 
    dos mkdir C:\true 
else 
    dos mkdir C:\false 
endif

this is my action script:

if {members of groups 49 of sites "actionsite"}
    dos mkdir C:\true 
else 
    dos mkdir C:\false 
endif

and this is the error I get now:

Command failed (This expression contained a character which is not allowed.) if {member of groups 49 of sites “actionsite”}

when executing:

members of groups 49 of sites "actionsite"

I have this error:
syntax error: unknown action command

I’ve tested this code, seems like it’s relevance.
it’s not an action script actually.

I’ve asked for an actionscript…is there a way to query it with action script?

I’ll say again what is my purpose:
I will create with my Orchestrator some file in specific location.
I will create an endless action from a task (!!!) that will run only on computers that has this file in specific location.
therefore, as you can see this task will be automatic and not manually.
therefore I’m going to write an action in a task that will have these logic inside;
if computer is a member of a specific group, then 1 app will be deployed, if computer is a member in different group then it will deploy 2nd app.

I have 4 groups, then I need to have 4 conditions to achieve this action.

for a group that does not exist, I get the same error about a character not allowed.

TRY:

if {exists sites "actionsite" whose (member of group 100 of it)}
dos mkdir c:\true
else
dos mkdir c:\false
endif
3 Likes

@brolly33

you saved my day.
thanks a lot!!!