You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

What is it for?

AQ_Instance_Update is used for updating an Attribute and/or Relation of one or more existing instances

Parameters

NameDescriptionTypeRequired
EntityThe type of the instance that should be updated.Module Element - EntityYes
Select one or moreYou can use an expression to select the instance that you want to update. They have to be instances of the entity selected in the above parameter. If left empty, it is assumed that the selected entity is either singleton or that an active instance exists.ExpressionNo
Clear existing valuesClears all attributes and relations before execution.BooleanNo
Attributes and RelationsAdd one line for each attribute or relation that you want to set.LineNo

AttributeSelect an attribute or relation of the entity selected above.Module element - Attribute/RelationNo

Value

Write an expression that results in a value for the selected attribute or relation. Leaving the expression empty or removing it clears the value of the selected attribute or relation.

ExpressionNo

This service executes all lines from top to bottom, so you could use the new value of an attribute or relation that you set in a previous line by using this attribute or relation in the expression of a next line. You can use attributes and relation in your desired order. 

The selected instance is not active in expressions. This allows for copying an instance of the same type. To have the option to have it active is an improvement for the future.

Example

Imagine a situation in which you want to update all job instances. You want to calculate the years of experience. All jobs that have no until date filled in, should get the value TODAY. The service shown below will update all job instances with an unknown end date within one service.

  • All Jobs are selected that have an unknown end date with the expression: COLLECT Job FROM ALL Job WHERE (Job.EndDate = ?)
  • The attribute Job.EndDate gets the value TODAY
    • This is done for every instance found by the expression.