Set the equipment context in a form
You can dynamically update the equipment context by using a client method on a WPF form.
- Prerequisites
- Add a client method to a form or display
About this task
Note: You cannot set a WPF form's equipment context for use in the Web Task List.
Procedure
- From the navigator, click .
- Add a WPF form, or from the Forms list, select an existing WPF form.
- Click .
- Click the MainForm.xaml tab.
- Click the Toolbox tab.
- Select the control that you want to add an equipment context to, and then drag and drop it into the Designer.
- To configure the control's appearance, click the Properties tab.
- Click the Client Methods tab.
- Click Add.A client method appears in the list.
- Select the client method, and then click the Properties tab to configure the method.
- In the Source field, click the ellipsis button.The Configure Method dialog box appears.
- Configure the properties, as required.Note: To view the full list of properties, select the Advanced check box.
- To set the equipment context in a workflow Task List, click SetEquipmentContext, and then click Finish.Note: All manual settings are overridden if a form in the Task List uses the Set Equipment Context client method to assign equipment.
- In Properties panel, in the Equipment field:
- Click the ellipsis button to link to a piece of equipment, or
- Click the drop-down arrow and bind to an input parameter.
- Optional: In the EventTriggers field, click Add.The Event Triggers dialog box appears.
- Optional: From the Controls drop-down list, expand the button that you want to add an event trigger to, select Click, and then click OK.
- Click Save.
- To use the functionality of this form, add it to a workflow.
- Insert and configure a Form activity.
- In the Form field, click the ellipsis button to add the form that contains the equipment context button.
- Click Save.
- Optional: To prevent changing context information during run time, you can hide or disable the buttons on the Task List.