View: Difference between revisions

Jump to navigation Jump to search
1,665 bytes added ,  6 July 2020
reorganized
(→‎Row scripts: moved to a standalone article)
(reorganized)
Line 108: Line 108:


Three binding types exist:
Three binding types exist:
* Value – this is the default option. This way the field data is shown in standard way, so that you can see the value of the field in Mobile CRM app.
* Value – this is the default option. This way the field data is shown in a standard way, so that you can see the value of the field in the Mobile CRM app.
* Raw Value – this makes sense for example for option sets, if you want to display the numeric representation of an option, rather than its label. This is useful, if you don’t want to display text, but different view images, or map pins based on different value of the option set. It is because images cannot have space in their names
* Raw Value – this makes sense for example for option sets, if you want to display the numeric representation of an option, rather than its label. This is useful if you don’t want to display text, but different view images, or map pins based on different value of the option set. It is because images cannot have space in their names
* Constant – this binding type allows you to enter static text. The exact text is displayed in the app, instead of the entity field data. This way you can add labels to views, for example to describe fields that only show numeric values.
* Constant – this binding type allows you to enter static text. The exact text is displayed in the app, instead of the entity field data. This way you can add labels to views, for example, to describe fields that only show numeric values.


==== Anchors ====
==== Anchors ====
Line 119: Line 119:
For more information about anchors, see [https://blog.resco.net/2018/10/17/advanced-tip-managing-cell-anchors-in-views/ Advanced tip: Managing cell anchors in views]. {{Badge|Blog}}
For more information about anchors, see [https://blog.resco.net/2018/10/17/advanced-tip-managing-cell-anchors-in-views/ Advanced tip: Managing cell anchors in views]. {{Badge|Blog}}


== Edit styles ==
== General controls, adding new cells ==
[[File:View toolbar cell section.png]]
 
The toolbar is divided into related blocks. The first section, '''Cell''', contains general functions and functions that add or modify cells on your view.
 
* Save, Save & Close – Save your changes.
* Add – Add a new text cell to the view.
* Delete – Remove the select cell from the view.
 
=== Images and map pins ===
 
Click '''Add Image''' and select the type of image to add an image to your view. See [[Images#Add_images_to_views_and_forms|Add images to views and forms]] for more information.
 
Click '''Add Map Pin''' to add a map pin image to your view. You can then select many options for the map pins or use custom pins. See [[Global_map#Custom_map_pins|Custom map pins]] for more information.
 
You can also watch this [https://www.youtube.com/watch?v=9o9MS6gldr4 WEBINAR] for more info on Map Pins. {{Badge|Webinar}}
 
=== Edit styles ===


To change existing styles or add new styles, select '''Edit Styles''' from the toolbar.
To change existing styles or add new styles, select '''Edit Styles''' from the toolbar.
Line 126: Line 143:


See '''[[Style_editor#Views_and_home_screen|Style editor]]''' for more information.
See '''[[Style_editor#Views_and_home_screen|Style editor]]''' for more information.
== Additional configuration ==
A view can include additional components, not only entity fields. You can also configure how the data should be displayed.


=== Buttons ===
=== Buttons ===
Line 141: Line 154:
# Select '''Buttons''' from the toolbar.
# Select '''Buttons''' from the toolbar.
# The right pane shows your available commands, the left pane shows commands in use. Add buttons from right to left.
# The right pane shows your available commands, the left pane shows commands in use. Add buttons from right to left.
# For some commands you can specify more details, for example what child entity record to create or which status to set for the record. Select the command and click '''Properties'''.
# For some commands you can specify more details, for example, what child entity record to create or which status to set for the record. Select the command and click '''Properties'''.


=== Actions when multiple records are selected ===
=== Actions when multiple records are selected ===
Line 150: Line 163:


The operation is similar to [[Form commands]]. To see how it works, please check this [https://youtu.be/REgaV6ymYWM?t=20m27s webinar section]. {{Badge|Webinar}}
The operation is similar to [[Form commands]]. To see how it works, please check this [https://youtu.be/REgaV6ymYWM?t=20m27s webinar section]. {{Badge|Webinar}}
== Query functions ==
[[File:View toolbar query section.png]]
=== Select fields ===
Click '''Select Fields''' to define which fields for the main entity, or even from related entities, should be available in the view. These fields are loaded from the database when the view is displayed. All fields that are displayed in the view must be loaded, but you can also load additional fields, for example, if you want to allow the user to filter the view according to these fields.


=== Edit filter ===
=== Edit filter ===
Line 169: Line 190:
If you have fields for GPS coordinates in the entity, and if you enable this option for the mobile project, users will be able to switch the view from list to map; the records will be displayed on the map.
If you have fields for GPS coordinates in the entity, and if you enable this option for the mobile project, users will be able to switch the view from list to map; the records will be displayed on the map.


=== Images and map pins ===
=== Sort fields and filter fields ===
Since version 9.1 of Mobile CRM app, you can set up additional sorting and filtering on view by using the Search bar. In these two view options, you can specify which fields are available to users for this additional sorting and filtering.
 
=== Date fields ===
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 ==
 
[[File:View upper menu rows rules.png|600px]]
 
=== Rows section ===
 
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.


Click '''Add Image''' and select the type of image to add an image to your view. See [[Images#Add_images_to_views_and_forms|Add images to views and forms]] for more information.
* Copy Design – changes current row template design
* 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. The order can be seen in a left menu under "Row". The first row template is the default one. It is important for example when using the custom responsive layout.


Click '''Add Map Pin''' to add a map pin image to your view. You can then select many options for the map pins or use custom pins. See [[Global_map#Custom_map_pins|Custom map pins]] for more information.
=== Rules section ===


You can also watch this [https://www.youtube.com/watch?v=9o9MS6gldr4 WEBINAR] for more info on Map Pins. {{Badge|Webinar}}
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


=== Sort fields and filter fields ===
=== iFrames ===
Since version 9.1 of Mobile CRM app, you can set up additional sorting and filtering on view by using the Search bar. In these two view options, you can specify which fields are available to users for this additional sorting and filtering.


=== Date fields ===
You can use [[Offline HTML]] functionality to add JavaScript and JSBridge to views and perform validation; for example when you use the view to change the data (editable fields, MultiSelect), and to handle view buttons. It is also possible to use JavaScript and JSBridge to load records to the view ([[FetchXML]]).
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.


== Advanced view features ==
For more information about extending views by using this technology, please check the following part of a [https://youtu.be/uocH_yaytq0?t=35m33s webinar]. {{Badge|Webinar}}


Many advanced features involve adding [[business logic]] to your view. See [[Rules editor]] for more information.
There are additional validation options, like the possibility for the app to ask whether a change should be saved or discarded, when users edit records on lists;


=== Row scripts ===
OnChange and OnSave actions triggering in JavaScript, validations when records are modified or saved directly on a list, etc. can be seen in this [https://youtu.be/B5mMIqJYy-Y?t=48m15s webinar]. {{Badge|Webinar}}


You can define multiple row designs for a view, and then you can define conditions when specific row design should be used. See '''[[Row script]]''' for more information.
== Miscellaneous ==


=== Best practice in renaming a view ===
=== Best practice in renaming a view ===
Line 214: Line 254:


To enable a clickable field on a view, set the field’s '''Kind''' to Text-Click or Image-Click.
To enable a clickable field on a view, set the field’s '''Kind''' to Text-Click or Image-Click.
=== iFrames ===
You can use [[Offline HTML]] functionality to add JavaScript and JSBridge to views and perform validation; for example when you use the view to change the data (editable fields, MultiSelect), and to handle view buttons. It is also possible to use JavaScript and JSBridge to load records to the view ([[FetchXML]]).
For more information about extending views by using this technology, please check the following part of a [https://youtu.be/uocH_yaytq0?t=35m33s webinar]. {{Badge|Webinar}}
There are additional validation options, like the possibility for the app to ask whether a change should be saved or discarded, when users edit records on lists;
OnChange and OnSave actions triggering in JavaScript, validations when records are modified or saved directly on a list, etc. can be seen in this [https://youtu.be/B5mMIqJYy-Y?t=48m15s webinar]. {{Badge|Webinar}}


=== Responsive view / list ===
=== Responsive view / list ===

Navigation menu