Jump to content

Cell Click: Difference between revisions

From Resco's Wiki
No edit summary
Marek Rodak (talk | contribs)
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Rules TOC}} {{WIP}}
{{Rules TOC}}
<span style="float:left; padding-right:10px">[[File:Cell Click.png|100 px]]</span>
Rules are client-side scripts (no-code [[business logic]]) that are executed when a user of the mobile app interacts with the app. The '''Cell Click rules''' are executed when an editable or clickable cell is clicked. Rules are managed using the [[rules editor]], usually in [[Woodford]].
Rules are client-side scripts (no-code [[business logic]]) that are executed when a user of the mobile app interacts with the app. The '''Cell Click rules''' are executed when an editable or clickable cell is clicked. Rules are managed using the [[rules editor]], usually in [[Woodford]].


Cell Click rules are only available on the '''[[view]]s'''; more specifically, on [[View#Clickable_field|clickable]] or [[View#Editable_field|editable fields]].
Cell Click rules are only available on the '''[[view]]s'''; more specifically, on [[View#Clickable_field|clickable]] or [[View#Editable_field|editable fields]].


== Example: messagebox with options ==
==Cell Click variables==
; Handled: If false (default) the standard behavior is executed after the rule. If True, it is skipped.
:{| class="wikitable"
| Handled || Assign || False
|}
 
; DirectEdit: Controls how the changes to the entity are handled (if there are any).
:* True and the entity is dirty after the rule executes, the entity is saved to storage (OnSave rule is run).
:* False, if a property is changed the ChangeRule is run and the entity is added to the list of dirty entities to be saved on user command.
:* Null (not-set, default), changes are ignored.
 
== Example: message box with options ==


In this example, we make "Price" a clickable field on the "Real Estates" view. It displays a message box, and users can modify the price.
In this example, we make "Price" a clickable field on the "Real Estates" view. It displays a message box, and users can modify the price.


[[File:Message box in the app.png|400px]]
[[File:Message box in the app.png|alt=Cell Click message box example 1|400px]]
 
First, edit the view in question and make a field clickable:
 
[[File:Change Kind to Text-Click.png|alt=Cell Click message box example 2|600px]]
 
Then, set up a '''Cell Click''' rule.
* "mbox" is a [[StringList]] type of variable. It must be populated with the message box options.
* "mboxchoice" is an integer variable that is filled when a user selects an option on the message box.
* Option "0" saves the record afterwards. Option "1" leaves it "dirty".
 
[[File:Set up the messagebox.png|alt=Cell Click message box example 3|600px]]
 
 
 
 
 


# Edit the view in question and make a field clickable:<br>[[File:Change Kind to Text-Click.png|600px]]
{{Feedback}}
# Set up a '''Cell Click''' rule.<br>"mbox" is a [[StringList]] type of variable. It must be populated with the message box options.<br>"mboxchoice" is an integer variable that is filled when a user selects an option on the message box.<br>Option "0" saves the record afterwards. Option "1" leaves it "dirty".<br>[[File:Set up the messagebox.png|600px]]

Latest revision as of 15:19, 14 November 2023

Rules are client-side scripts (no-code business logic) that are executed when a user of the mobile app interacts with the app. The Cell Click rules are executed when an editable or clickable cell is clicked. Rules are managed using the rules editor, usually in Woodford.

Cell Click rules are only available on the views; more specifically, on clickable or editable fields.

Cell Click variables

Handled
If false (default) the standard behavior is executed after the rule. If True, it is skipped.
Handled Assign False
DirectEdit
Controls how the changes to the entity are handled (if there are any).
  • True and the entity is dirty after the rule executes, the entity is saved to storage (OnSave rule is run).
  • False, if a property is changed the ChangeRule is run and the entity is added to the list of dirty entities to be saved on user command.
  • Null (not-set, default), changes are ignored.

Example: message box with options

In this example, we make "Price" a clickable field on the "Real Estates" view. It displays a message box, and users can modify the price.

Cell Click message box example 1

First, edit the view in question and make a field clickable:

Cell Click message box example 2

Then, set up a Cell Click rule.

  • "mbox" is a StringList type of variable. It must be populated with the message box options.
  • "mboxchoice" is an integer variable that is filled when a user selects an option on the message box.
  • Option "0" saves the record afterwards. Option "1" leaves it "dirty".

Cell Click message box example 3




{{#CI form: title = Was this information helpful? How can we improve? | type = inputs | [textarea] }}