Jump to content

Cell Click: Difference between revisions

From Resco's Wiki
No edit summary
Marek Rodak (talk | contribs)
No edit summary
 
Line 20: Line 20:
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:
First, edit the view in question and make a field clickable:


[[File:Change Kind to Text-Click.png|600px]]
[[File:Change Kind to Text-Click.png|alt=Cell Click message box example 2|600px]]


Then, set up a '''Cell Click''' rule.
Then, set up a '''Cell Click''' rule.
Line 31: Line 31:
* Option "0" saves the record afterwards. Option "1" leaves it "dirty".
* Option "0" saves the record afterwards. Option "1" leaves it "dirty".


[[File:Set up the messagebox.png|600px]]
[[File:Set up the messagebox.png|alt=Cell Click message box example 3|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] }}