1

Cell Click

From Resco's Wiki
Jump to navigation Jump to search
Rules and examples

Cell Click.png 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




Was this information helpful? How can we improve?