View: Difference between revisions

Jump to navigation Jump to search
775 bytes removed ,  20 May 2024
Line 232: Line 232:
Click '''Date Fields''' to specify which fields that are used as Start and End date fields. This can be useful if you want to allow [[Calendar]] view for this entity.
Click '''Date Fields''' to specify which fields that are used as Start and End date fields. This can be useful if you want to allow [[Calendar]] view for this entity.


== Rows and rules functions ==
== Business logic ==


[[File:View upper menu rows rules.png|600px|alt=View upper menu rows rules]]
Resco mobile apps support custom [[business logic]] for adding advanced features to your views. Views support the following actions that trigger no-code scripts (rules). Rules are edited in the [[Rules_editor]].


=== Rows section ===
* [[Row Script]] – executed for each row when a view is loading or refreshing
 
* [[On Save]] – triggered by saving an [[#Editable_field|Editable field]]
You can define multiple row designs for a view, and then you can define conditions when a specific row design should be used. See '''[[Row script]]''' for more information.
* [[On Change]] triggered by changing an [[#Editable_field|Editable field]]
 
* [[Button Click]] triggered by tapping a view button
* Copy Design – changes current row template design
* [[Cell Click]] triggered by tapping a cell
* Add Row – add a new row template
* Clone Row – add a new row template, the design is copied from the current template
* Delete Row – delete the current row
* Up / Down – change the order of rows. Internally, rows are numbered: 0, 1, 2, etc. You can see the number for example in row script rules. The first row template is the default one. It is important for example when using the custom responsive layout.
 
=== Rules section ===
 
Many advanced features involve adding [[business logic]] to your view. Each of these buttons (except the last one) opens the [[Rules_editor#Actions_that_trigger_rule_execution|Rules editor]].
* Row Script – opens the row script editor
* On Save / On Change – opens the rule editor, applicable when [[#Editable_field|Editable field]] is set.
* Button Click – opens the rule editor, applicable when using buttons in a view.
* Cell Click – opens the rule editor, defines actions after clicking on a cell
* iFrame – adds JavaScript to a view


=== Iframes ===
=== Iframes ===

Navigation menu