Salesforce

How Do I Refresh the Subform View Only on Modifying the Last Argument When Passing Several (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Refresh the Subform View Only on Modifying the Last Argument When Passing Several Arguments to the Subform? (Magic xpa 3.x)

Normally, the subform will refresh itself whenever any of the parameters that are being passed to it change. However, if there are several parameters -- such as search criteria for a list -- then the subform will refresh every time the user changes any one of the criteria. This might not be what the user expects, and it can also slow down processing if it’s a complex search.

Using an expression on a subform automatic refresh

  1. On your parent task, make sure that your tab order is correct, by pressing from the toolbar.

  2. Make sure the last field has a Control Name (“Studio”, in this example).

  1. In the Subform control, set Automatic Refresh to False.

  2. Make sure the subform has a control name (“DVD Titles” in this example).

  1. In the Logic Editor, create a Control Suffix event for the last search criteria control.

  2. Add a Raise Event operation that raises the internal event Subform Refresh.

  3. As an argument to this event, pass the name of your subform (“DVD Titles” in this example).

Now, the subtask will refresh when the user passes the last control.

Hint: If this is combined with the Tab Into property on the subform, the user will enter the criteria and drop into the subform nicely. Also, in your Control Suffix control, you can add an Evaluate operation with CtrlGoTo() to set exactly which control in the subform the user lands on.

See also

The Online and Rich Client Samples projects (program SB03 and RSB03)

Reference
Attachment 
Attachment