Magidoc

syncGoalFromWidget
Mutation

Reads the scalar from the goal's sourceWidgetId widget (pivotNumbers, numbers or pivotTable) and writes it as the goal's currentValue. Each call records a goal metric history entry. Fails when the goal has no source widget or its source differs from expectedSourceWidgetId, when supplied.

Arguments

#

goalId

ID !
Non-null

expectedSourceWidgetId

Reject unless the saved source matches this widget ID. Null or omission skips this check.

Response

#

Returns Goal !.

Example

#