m (formatting) |
|||
Line 10: | Line 10: | ||
===Check empty content=== | ===Check empty content=== | ||
− | ;<code>[gn:act_widgetContent]|[keyword,target]</code> | + | :;<code>[gn:act_widgetContent]|[keyword,target]</code> |
− | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | + | :{| class="wikitable sortable" style="font-size: 85%; text-align: left;" |
|- | |- | ||
! scope="col" | Parameter | ! scope="col" | Parameter | ||
! scope="col" | Description | ! scope="col" | Description | ||
|- | |- | ||
− | | keyword | + | | <code>keyword</code> |
− | | | + | | defines comparison type |
Can be: | Can be: | ||
* <code>empty</code> | * <code>empty</code> | ||
* <code>notempty</code> | * <code>notempty</code> | ||
|- | |- | ||
− | | [[target]] | + | | <code>[[target]]</code> |
− | | [[target]] from which value will be used for | + | | [[target]] from which value will be used for comparison |
* Valid [[target|targets]]: | * Valid [[target|targets]]: | ||
** all [[Variables|variables]] | ** all [[Variables|variables]] | ||
** [[:Category:Widgets|widgets]] | ** [[:Category:Widgets|widgets]] | ||
− | *** [[GnEditText]] | + | *** <code>[[GnEditText]]</code> |
− | *** [[GnDropDown]] | + | *** <code>[[GnDropDown]]</code> |
− | *** [[GnMediaAction]] | + | *** <code>[[GnMediaAction]]</code> |
− | *** [[GnCaptureSignature]] | + | *** <code>[[GnCaptureSignature]]</code> |
− | *** [[GnPhoneNumber]] | + | *** <code>[[GnPhoneNumber]]</code> |
− | *** [[GnCheckBox]] | + | *** <code>[[GnCheckBox]]</code> |
− | *** [[GnAutoCompleteTextView]] | + | *** <code>[[GnAutoCompleteTextView]]</code> |
|- | |- | ||
|} | |} | ||
====Example==== | ====Example==== | ||
− | <code>empty</code> - keyword<br> | + | :<code>empty</code> - keyword<br> |
− | <code>@+id/resident_firstName</code> - target | + | :<code>@+id/resident_firstName</code> - target<br> |
− | <code>[gn:act_widgetContent]|[empty,@+id/resident_firstName]</code> | + | :; ⤷ <code>[gn:act_widgetContent]|[empty,@+id/resident_firstName]</code> |
<hr> | <hr> | ||
===Check the same content=== | ===Check the same content=== | ||
− | ;<code>[gn:act_widgetContent]|[keyword,target,source]</code> | + | :;<code>[gn:act_widgetContent]|[keyword,target,source]</code> |
− | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | + | :{| class="wikitable sortable" style="font-size: 85%; text-align: left;" |
|- | |- | ||
! scope="col" | Parameter | ! scope="col" | Parameter | ||
! scope="col" | Description | ! scope="col" | Description | ||
|- | |- | ||
− | | keyword | + | | <code>keyword</code> |
− | | | + | | defines comparison type |
Can be: | Can be: | ||
* <code>equals</code> | * <code>equals</code> | ||
* <code>notequals</code> | * <code>notequals</code> | ||
|- | |- | ||
− | | [[target]] | + | | <code>[[target]]</code> |
− | | [[target]] from which value will be used for | + | | [[target]] from which value will be used for comparison |
* Valid [[target|targets]]: | * Valid [[target|targets]]: | ||
** [[Variables|variables]] | ** [[Variables|variables]] | ||
− | *** [[Datatypes#text|text]] | + | *** <code>[[Datatypes#text|text]]</code> |
− | *** [[Datatypes#number|number]] | + | *** <code>[[Datatypes#number|number]]</code> |
− | *** [[Datatypes#pointer|pointer]] | + | *** <code>[[Datatypes#pointer|pointer]]</code> |
− | *** [[Datatypes#status|status]] | + | *** <code>[[Datatypes#status|status]]</code> |
− | *** [[Datatypes#counter|counter]] | + | *** <code>[[Datatypes#counter|counter]]</code> |
** [[:Category:Widgets|widgets]] | ** [[:Category:Widgets|widgets]] | ||
− | *** [[GnEditText]] | + | *** <code>[[GnEditText]]</code> |
− | *** [[GnDropDown]] | + | *** <code>[[GnDropDown]]</code> |
− | *** [[GnMediaAction]] | + | *** <code>[[GnMediaAction]]</code> |
− | *** [[GnCaptureSignature]] | + | *** <code>[[GnCaptureSignature]]</code> |
− | *** [[GnPhoneNumber]] | + | *** <code>[[GnPhoneNumber]]</code> |
− | *** [[GnCheckBox]] | + | *** <code>[[GnCheckBox]]</code> |
− | *** [[GnAutoCompleteTextView]] | + | *** <code>[[GnAutoCompleteTextView]]</code> |
|- | |- | ||
− | | [[source]] | + | | <code>[[source]]</code> |
| [[source]] from which value will be used for comparsion with [[target]] value | | [[source]] from which value will be used for comparsion with [[target]] value | ||
* Valid [[source|sources]]: | * Valid [[source|sources]]: | ||
** hardcoded values | ** hardcoded values | ||
** [[Variables|variables]] | ** [[Variables|variables]] | ||
− | *** [[Datatypes#text|text]] | + | *** <code>[[Datatypes#text|text]]</code> |
− | *** [[Datatypes#number|number]] | + | *** <code>[[Datatypes#number|number]]</code> |
− | *** [[Datatypes#pointer|pointer]] | + | *** <code>[[Datatypes#pointer|pointer]]</code> |
− | *** [[Datatypes#status|status]] | + | *** <code>[[Datatypes#status|status]]</code> |
− | *** [[Datatypes#counter|counter]] | + | *** <code>[[Datatypes#counter|counter]]</code> |
** [[:Category:Widgets|widgets]] | ** [[:Category:Widgets|widgets]] | ||
− | *** [[GnEditText]] | + | *** <code>[[GnEditText]]</code> |
|- | |- | ||
|} | |} | ||
====Example==== | ====Example==== | ||
− | <code>equals</code> - keyword<br> | + | :<code>equals</code> - keyword<br> |
− | <code>@variable/metersCount</code> - target<br> | + | :<code>@variable/metersCount</code> - target<br> |
− | <code>0</code> - value which will be compared with target value | + | :<code>0</code> - value which will be compared with target value<br> |
− | <code>[gn:act_widgetContent]|[equals,@variable/metersCount,0]</code> | + | :; ⤷ <code>[gn:act_widgetContent]|[equals,@variable/metersCount,0]</code> |
<hr> | <hr> | ||
===Check part of content=== | ===Check part of content=== | ||
− | ;<code>[gn:act_widgetContent]|[keyword,target,source]</code> | + | :;<code>[gn:act_widgetContent]|[keyword,target,source]</code> |
− | {| class="wikitable sortable" style="font-size: 85%; text-align: left;" | + | :{| class="wikitable sortable" style="font-size: 85%; text-align: left;" |
|- | |- | ||
! scope="col" | Parameter | ! scope="col" | Parameter | ||
! scope="col" | Description | ! scope="col" | Description | ||
|- | |- | ||
− | | keyword | + | | <code>keyword</code> |
− | | | + | | defines comparsion type |
Can be: | Can be: | ||
* <code>contains</code> | * <code>contains</code> | ||
|- | |- | ||
− | | [[target]] | + | | <code>[[target]]</code> |
| [[target]] from which value will be used for comparsion | | [[target]] from which value will be used for comparsion | ||
* Valid [[target|targets]]: | * Valid [[target|targets]]: | ||
** [[Variables|variables]] | ** [[Variables|variables]] | ||
− | *** [[Datatypes#text|text]] | + | *** <code>[[Datatypes#text|text]]</code> |
− | *** [[Datatypes#number|number]] | + | *** <code>[[Datatypes#number|number]]</code> |
− | *** [[Datatypes#pointer|pointer]] | + | *** <code>[[Datatypes#pointer|pointer]]</code> |
− | *** [[Datatypes#status|status]] | + | *** <code>[[Datatypes#status|status]]</code> |
− | *** [[Datatypes#counter|counter]] | + | *** <code>[[Datatypes#counter|counter]]</code> |
|- | |- | ||
− | | [[source]] | + | | <code>[[source]]</code> |
| [[source]] from which value will be used for comparsion with [[target]] value | | [[source]] from which value will be used for comparsion with [[target]] value | ||
* Valid [[source|sources]]: | * Valid [[source|sources]]: | ||
** [[Variables|variables]] | ** [[Variables|variables]] | ||
− | *** [[Datatypes#text|text]] | + | *** <code>[[Datatypes#text|text]]</code> |
− | *** [[Datatypes#number|number]] | + | *** <code>[[Datatypes#number|number]]</code> |
− | *** [[Datatypes#pointer|pointer]] | + | *** <code>[[Datatypes#pointer|pointer]]</code> |
− | *** [[Datatypes#status|status]] | + | *** <code>[[Datatypes#status|status]]</code> |
− | *** [[Datatypes#counter|counter]] | + | *** <code>[[Datatypes#counter|counter]]</code> |
|- | |- | ||
|} | |} | ||
====Example==== | ====Example==== | ||
− | <code>equals</code> - keyword<br> | + | :<code>equals</code> - keyword<br> |
− | <code>@variable/metersCount</code> - target<br> | + | :<code>@variable/metersCount</code> - target<br> |
− | <code>@variable/totalCount</code> - value which will be compared with target value | + | :<code>@variable/totalCount</code> - value which will be compared with target value<br> |
− | <code>[gn:act_widgetContent]|[equals,@variable/metersCount,@variable/totalCount]</code> | + | :; ⤷ <code>[gn:act_widgetContent]|[equals,@variable/metersCount,@variable/totalCount]</code> |
<hr> | <hr> |
Revision as of 13:30, 12 July 2017
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
- target0
- 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
equals
- keyword@variable/metersCount
- target@variable/totalCount
- value which will be compared with target value
- ⤷
[gn:act_widgetContent]|[equals,@variable/metersCount,@variable/totalCount]
- ⤷