Button bar active segment by calculation

In a simple test file this code works.

Set Variable [ $$activeSegment ; "NavBtnBar_Invoice" ]
Refresh Object [ "NavBtnBar" ]
  1. Buttonbar is named "NavBtnBar". It has three segments, labelled "Invoice", "Customer","Product"
  2. The button segments are named (object name not button label) "NavBtnBar_Invoice", "NavBtnBar_Customer", "NavBtnBar_Product"
  3. Active segment calculation is "$$activeSegment"
  4. create a script using the script steps above.

To see the active button segment being changed, select any segment except "invoice" then run the script. If you have set everything up correctly the "invoice" segment is displayed in the active state.

Edit:

  1. if the calculation uses a field in the current record, and that field is modified, that would trigger an immediate update.
  2. the calculation can use a field in a related record, and that will trigger an update
  3. rearrange the steps above for easier understanding
1 Like