CLI Reference > Configuration Management Commands > si setmemberrule
 
si setmemberrule
sets the member rule for one or more members
Synopsis
si setmemberrule [--clear] [--[no]confirm] [--[no]expand] [-f] [--[no|confirm]overrideRule] [(-r rev|--revision=rev)] [(-R|--[no|confirm]recurse)] [--[no]failOnAmbiguousProject] [--filter=filteroptions] [(-P project|--project=project)] [(-S sandbox|--sandbox=sandbox)] [--devpath=path] [--hostname=server] [--port=number] [--password=password] [--user=name] [(-?|--usage)] [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]] [(-g|--gui)] [--quiet] [--settingsUI=[gui|default]] [--status=[none|gui|default]] member...
Description
A member rule is a revision--typically a symbolic revision--attached to a member that you can use regularly to update the member’s revision or use it with any command that allows you to specify the member rule as a pre-defined revision. In the graphical user interface, only the Check Out and Update Member Revision commands allow you to specify a member rule. In the command line interface, any command that accepts the -r|--revision option allows you to specify a member rule. For example, you can check out a revision corresponding to the member rule in the graphical user interface or add a label to a revision corresponding to the member rule in the command line interface. After you create a rule for a member, you can also view the rule using the si memberinfo command.
* 
By design, applying a rule as a member revision to a member does not dynamically update the member revision of the corresponding member in an external project configuration (normal, variant, build). For example, if member 1’s member revision is updated in project A, the corresponding member in a variant of project A with the rule configured to link to project A is not updated with the same member revision. To update the corresponding member in the variant according to the member rule, you must use the si updaterevision command with the member rule, or your administrator can configure the ClientLink.js sample event trigger script that enables dynamic updating of linked member revisions under certain conditions. For more information, contact your administrator.
Example:
1. A project administrator defines a rule based on a label and implements it:
si setmemberrule -rReadyForUse demoapp.c demoapp.h
si updaterevision -r:rule demoapp.c demoapp.h
si freeze demoapp.c demoapp.h
2. Developers work as usual, using
:member.
* 
In this scenario, it is not expected that members with the rule are modified locally.
3. From time to time, the project administrator re-applies the rule, based on new revisions marked ReadyForUse:
si thaw demoapp.c demoapp.h
si updaterevision -r:rule demoapp.c demoapp.h
si freeze demoapp.c demoapp.h
Several rule filters are available so you can easily work with members that contain rules. For more information, see the --filter option in the options reference page.
Options
This command takes the universal options available to all si commands, as well as some general options. See the options reference page for descriptions.
--clear
clears the member rule and removes it from the specified members.
--[no]confirm
causes Integrity Lifecycle Manager to confirm that the rule will be cleared.
--[no]expand
controls whether to expand the revision before setting the rule.
-f
forces removal of the rule without confirmation.
--[no|confirm]overrideRule
controls whether to override the existing member rule.
member...
identifies a specific member; use spaces to specify more than one member.
Diagnostics
See the diagnostics reference page for possible exit status values.
Preferences
Using si setprefs or si viewprefs, you are able to set or view the preference keys for this command.
See Also
Commands:
si ci, si co, si edit, si resync, si revert, si updatearchive, si updaterevision
Miscellaneous:
ACL, diagnostics, options, preferences