Navigation:  Actions > Custom Action Details >

Field Overrides

Previous pageReturn to chapter overviewNext page

Each custom action provides a convenient user interface for entering fields that are pertinent for that action.  Visual Build provides great flexibility when entering values for string fields, allowing the use of macros (delimited by percent % chars) and script code (delimited by bracket [ ] chars) within these fields.  But sometimes it would be useful to generically define the value for a checkbox, combo box, or radio button field (for instance to have a single step to register or unregister a component or to force or not force a build of a Visual Studio project).


Visual Build provides a field override capability for these situations, allowing any custom action checkbox, radio button, or combo box value to be defined as a string value (which can contain also script or macros) to be evaluated at build time and converted to a boolean (for checkboxes) or integer (for radio buttons and combo boxes) value to determine that field's value.  A macro referenced in the override field could be defined by passing it into the build, by prompting the user, etc., dynamically determining what that field's value is.


To enter an override value for one of these fields, tab to the field to override and press F2 or click the Insert Macro button.  An override edit control will displayed on top of the checkbox/radio button/combo box, and a value can be entered.  The Insert Macro and Script buttons can be used to insert macros or script code, and the field tool tip will displayed just as it is for other string fields.




To undo changes in an override field, type Alt+Backspace, or press Esc to cancel all changes made to the dialog.  To accept changes and hide the edit control, click the OK button next to the edit control, tab to another field and press F2 to enter an override for that field, or press Enter to accept all changes made in the dialog.


When an override value has been entered for a field, an asterisk * will be displayed following that field to indicate that an override exists (press F2 while focus is on the field to edit an existing override).  Holding the mouse over the field containing an override will display the override value with any macros expanded.  The value of the checkbox, radio button, or combo box will not necessarily correspond to the actual override value.




To remove an existing override, clear out the override edit control value.  Or click on the checkbox, combo box, or a radio button in the group.  A messagebox will be displayed confirming that the override value should be removed, and if accepted, the asterisk will be removed from the field and the actual checkbox/radio button/combo  box value will be used.


When the step is built, any override fields will be converted to a boolean or integer value (if the value cannot be converted [it is not a valid number], an error will be logged and the build will stop).  For checkboxes, a value of 0 evaluates as False and any other number (1, -1, etc) evaluates as True.  For radio buttons and drop-down list combo boxes, the value must be a zero-based value corresponding to one of the radio buttons in the group or items in the list.


All checkbox and radio button fields on custom actions screens can be overridden.  The only exceptions are the conditional build rule fields on the General tab, which cannot be overridden.