From wiki.ginstr.com
Jump to: navigation, search

gn:act_widgetContent

Description
Action used to check content of a widget and compares it with keyword. This is useful for business logic checks depending on some result or data in some widget, field.
Action returns
boolean

Action signatures

Check empty content

[gn:act_widgetContent]|[keyword,target]
Parameter Description
keyword defines comparison type

Can be:

  • empty
  • notempty
target target from which value will be used for comparison

Example

empty - keyword
@+id/resident_firstName - target
[gn:act_widgetContent]|[empty,@+id/resident_firstName]

Check the same content

[gn:act_widgetContent]|[keyword,target,source]
Parameter Description
keyword defines comparison type

Can be:

  • equals
  • notequals
target target from which value will be used for comparison
source source from which value will be used for comparsion with target value

Example

equals - keyword
@variable/metersCount - target
0 - value which will be compared with target value
[gn:act_widgetContent]|[equals,@variable/metersCount,0]

Check part of content

[gn:act_widgetContent]|[keyword,target,source]
Parameter Description
keyword defines comparsion type

Can be:

  • contains
target target from which value will be used for comparsion
source source from which value will be used for comparsion with target value

Example

contains - keyword
@variable/servicesRendered - target
@variable/specialService - value which will be compared with target value
[gn:act_widgetContent]|[contains,@variable/servicesRendered,@variable/specialService]

Check relation between two numeric values

[gn:act_widgetContent]|[keyword,target,source]
Parameter Description
keyword defines comparsion type

Can be:

  • =
  • >
  • <
  • >=
  • <=
target target from which value will be used for comparsion
source source from which value will be used for comparsion with target value

Example

>= - keyword
@+id/meterCurrentConsumption - target
@variable/zero - value which will be compared with target value
[gn:act_widgetContent]|[>=,@+id/meterCurrentConsumption,@variable/zero]

Check equality between two status (boolean) values

[gn:act_widgetContent]|[keyword,target,source]
Parameter Description
keyword defines comparsion type

Can be:

  • equals
  • notequals
target target from which value will be used for comparsion
source source from which value will be used for comparsion with target value

Example

>= - keyword
@+id/isMeterCurrentConsumption - target
@variable/true - value which will be compared with target value
[gn:act_widgetContent]|[equals,@+id/meterCurrentConsumption,@variable/zero]

Check pointerDT internal value

[gn:act_widgetContent]|[keyword,source,,internalValue]
Parameter Description
keyword defines comparsion type

Can be:

  • empty
  • notempty
source source from which value will be used for comparsion
[internalValue] internal value from source which will be used for comparsion
  • Can be:
    • hardcoded

Example

empty - keyword
@variable/siteInventory_productName_2 - pointer DT source
value - pointer internal attribute
[gn:act_widgetContent]|[empty,@variable/siteInventory_productName_2,,value]