Configurations for Mobile via Page Designer¶
All configurations are done via the use of IFS Cloud Web Page Designer. Configurations in the mobile app can only done by an Admin user on IFS Cloud.
Adding a Custom Attribute¶
- Follow the instructions to setup Custom Attribute for Entity
-
Ensure that the Entity is Approved, Published and Synchronized and the Attribute also is Approved and Published.
-
Go to Entity Details to publish the entity attributes for the mobile app by going to Solution Manager > Mobile Apps > Configuration > Entity Details.
-
Filter by Mobile app name, and then by the Entity name.
-
Under the Attributes table, use "Add Custom Attributes" button to select the newly created attribute.
-
Now "Publish Custom Attributes".
-
To configure the app to view this new custom attribute, use Page Designer to update the mobile app.
-
Solution Manager > Mobile Apps > Configuration > Apps for Page Designer > [Select the app to update] and go to the detail view for that entity.
-
Open up the view in page designer & update the view to include the new field.
-
Save & Publish Page Designer changes.
-
The mobile client needs to be reinitialized if already logged in, to see the new field changes.
Troubleshooting: If the custom field is not visible, Refresh MobileApplication Cache to force refresh the cache (Solution Manager > System Information and Utilities > Refresh Server Cache)
Setting Conditional Visibility, Editability and Requiredness¶
Users can set Conditional Visibility, Editability and Requiredness on fields on mobile screens by following the same process as with Conditional Fields. Refer Conditional Fields for more details.
As of 24R1, this functionality is supported for the most common field types such as Text, Number and BLOB/CLOB fields. Custom Fields of type Text, Number and Date are also supported. Other field types have limited support on 24R1, for example in setting the Required property on Boolean fields and setting Visibility on Lists. Further, conditional expressions must use the "record" prefix, and functions (see Condition Syntax) are not supported in Mobile.
In addition, care must be taken with conditional expressions with references. For example, remember to refer to the Entity Model to identify relationships to use in references. Note also that a referenced data record needs to be saved before the conditional expression reflects those changes.
Setting Conditional Commands¶
Users can set Commands to be conditionally enabled or disabled by following the same process as with Conditional Fields and setting the Enabled property on a Command. Refer the previous section for more details.
Setting Conditional Field Validations¶
Users can configure their own conditional validations to reflect their business rules that are not already covered in the core product. A number of rules can be defined for each field based on other data available on the current record or its context using the same conditional syntax as above.
While Mobile supports the same validations concept, these rules have limited support in instances like Assistants. For example, while they can be used in multi-step Assistants, they should be configured in a "forward facing" manner, where any references to local data should only be for fields from a prior step.
Note also that unlike other page configurations, these validation rules are evaluated sequentially whenever a record is saved or an Assistant step changes. As such, any validation errors being displayed will only clear on the Save or Prev/Next action, and as such, these validation rules should be configured with care to ensure performance is not adverserly affected on mobile devices.
For more details on Conditional Field Validations, see Conditional Field Validations.
Note additionally that as documented in the Condition Syntax - Functions section, Regular Expressions must be used with care and tested extensively with all target mobile platforms and operating systems. A pattern that works on a browser may work in subtly different ways across Android, iOS or Windows platforms and even on different OS versions.
Setting Field Default Values¶
Users can configure Field Default Value rules to set the iniitial value on fields when creating a new record. For mobile, this is only supported when a new record is being created via an Assistant. Both the Case for the rules as well as the default value itself can make use of CSV values, data entered in a prior step in multi-step assistants or the parent record. A number of rules can be defined for each field this way using the same conditional syntax as above.
For more details on Field Default Values, see Field Default Values.
Filtering of LoV and Enumerations¶
Users can filter LoV and Enumeration fields on mobile screens by following the same process as with Conditional LoV and Enumeration Filtering.
For LoV filtering, refer Filter LOV's conditionally for more details.
For Enumeration filtering, refer Filter Enumeration Values Conditionally for more details.
As of 24R1, LoV filtering supports the following OData expressions: startswith
, endswith
, contains
.
This functionality can also be used to logically connect multiple LoV's together to form hierarchical lists.
Adding a Custom Action¶
-
Open Page Designer for the mobile app by going to Mobile Apps > Configuration > Apps for Page Designer > [App Name].
-
Navigate to a page, and add a command by clicking (+) on the Command group section.
-
Under Content for the page, find the Command Group section. Refer Adding Commands
-
Select command type and add a label for the command.
-
Save & Publish Page designer changes.
-
Initialize the mobile client.
-
Go to the page on the mobile app. User should be able to navigate to the new page via the command button.
Note: Custom Entities have limited support under the Batch Sync model. Custom Entities cannot be defined as Push types.
Adding a Page¶
Users can create a new page to an existing projection.
-
Open Page Designer for the mobile app by going to Mobile Apps > Configuration > Apps for Page Designer > [App Name].
-
Add a new page and update the layout.
-
Save & Publish and close Page Designer.
-
Now that the page is created, the app needs to be able to navigate to it.
Update Navigator entries on the Mobile app¶
Users can navigate to a page via a navigator entry or via a command
To navigate to the page via navigator entry:
1. Open Navigator Designer and navigate to Mobile Apps > Configuration > Apps for Page Designer > [App Name]
-
Create a new navigator entry of type Page for an existing page or new page.
-
Save & Publish navigator changes.
-
Initialize the mobile client.
-
User should be able to navigate to the added page.
To navigate to the page via a command:
1. Go to an existing page on Page Designer.
-
Add a command to the command group section on the page.
-
Add a new NavigationLink command.
-
Select the (new) page to navigate to.
-
Optionally, specify a NavigateFilter.
-
Save & Publish Page designer changes.
-
Initialize the mobile client.
-
Go to the existing page. User should be able to navigate to the added page via the command button.
Note: When defining a new NavigationLink, InitContext and Context are not supported in Mobile. In addition, the use of Enumeration and Date/Time parameters in the NavigateFilter is also not supported.
Using the Navigator Designer, users can also remove a navigator entry or update navigator entries on the dashboard.
Working with Custom Entities¶
Custom Entities can be used in Mobile apps in different ways, and relationships can also be modelled between a baseline Entity and a Custom Entity. Here are some example scenarios.
Custom Entity with read-only list view¶
To create a standalone read-only list view with a Custom Entity (for example to show some data that mobile users may need to refer to): 1. Go to Entity Configurations screen and create a new Custom Entity and also add the relevant attributes to it before saving and publishing it.
-
Go to Projection Configuration screen and choose to Configure a Standard Projection, select the app (for example ServiceEngApp) to be configured, add the new Custom Entity and decide on the operations to be allowed as well as specify the Sync Policy and publish the Projection Configuration.
-
Open Page Designer, open some page within the app to be configured and create a new List element using the newly created Custom Entity and add the needed attributes.
-
Within Page Designer, create a new Page, set the Datasource Entity Set and add the newly created List element to the Page's content, and then save and publish the Page Designer changes.
-
Open Navigator Designer and provide a way for users to reach the newly created page.
-
Ensure that data can is added to the new Custom Entity.
-
Initialize the mobile client and users should now be able to refer the newly created data records. It will be necessary to ensure that the Custom Entity has synced after the data was added.
See also the Tailoring Guide section for creating Master Detail Associations, especially the List of Details section.
Custom Entity with a 1:1 relationship to a baseline Entity¶
To model a 1:1 relationship between a Custom Entity and a baseline Entity (for example to augment an existing Mobile screen with new information): 1. Similar to the previous scenario, use Entity Configuration screen to model a Custom Entity.
-
As before, do the Projection Configuration and additionally model an Association from the base Entity to the new Custom Entity and do the key mapping from the parent Entity's keys to the child Entity's keys, and publish the Custom Entity.
-
Open Page Designer, open some page within the app to be configured and create a new Singleton object for the new Custom Entity and also create a Crudactions object.
-
Within Page Designer, also create a new Group connected to the new Custom Entity and add the Custom Entity fields.
-
Within Page Designer, open the Page that should contain the new Custom Entity fields, and add the newly created Singleton and add to it a Binding with Bindname being an appropriate Selector, and Property being set to the Association created earlier.
-
Within Page Designer, add the newly created Group to the page and add a Binding to it with Bindname having the newly created Singleton and Property being left empty.
-
Open Navigator Designer and provide a way for users to reach the newly created page.
-
If any data needs to be added to the Custom Entity, ensure that it can be done (for example by creating a page on the backend) and sync the Custom Entity.
-
Initialize the mobile client and users should now be able to work with the Custom Entity.
See also the Tailoring Guide section for creating Master Detail Associations, especially the One-to-one detail view section.
Custom Entity with support for CUD operations¶
-
Follow the same steps as the read-only list and create the Custom Entity with support for Create, Update and Delete operations and set the Sync Policy.
-
Using Page Designer, create a new detail page using the newly created Custom Entity and add the needed attributes. Add a selector created by the Custom Entity to iterate the records. Enable the crudactions in order to perform CRUD opertations.
-
Open Navigator Designer and provide a way for users to reach the newly created page.
-
Ensure that some data is added to the new Custom Entity, for example via another page available on the backend.
-
Initialize the mobile client and users should now be able to refer the newly created data records. It will be necessary to ensure that the Custom Entity has synced after the data was added.
-
In the bottom of the page, the "New" icon and the delete icon will be available to add or delete records. Inline edit option will be available to update records.
-
User can now add, edit and delete a new record with different types of attributes on the mobile device and later sync with the backend database.
Note: only detail pages support CUD operations on mobile apps.
Custom Entity with overview and detail pages and navigation support¶
To model a custom entity with overview and detail pages including support for navigating between them:
-
Similar to the previous scenario, use Entity Configuration screen to model a Custom Entity. Follow the steps from the two scenarios above to model both a readonly list view as well as an edit-capable detail page for it.
-
Similar to the previous examples, use Page Designer to create a List Page using the Custom Entity, with a Card for the attributes.
-
Using Page Designer, create also a Detail Page for the Custom Entity, create a Singleton and bind to it. Create a Group with the Custom Attributes and add to the Page Contents.
-
Go back to the List and add a new Command item of type Navigation Link to the page's Command Groups. Enter the details such as target page name and relational keys. Since the navigation is to the same entity, you can use the ‘objkey’ as the filtering keys. Save and publish configuration.
-
Open Navigator Designer and add an entry for the newly created List Page so that users can reach it. Save and publish this change too.
-
Make sure to add some records to the Custom Entity (for example by creating another page on the backend) and sync via Synchronization Rule.
-
Initialize the mobile client and users should now be able to go to the newly added Navigation Entry to the List Page of the Custom Entity. Go to the List and select a record and use the Command Button to navigate to the Detail Page of the Custom Entity from the List Page.
Note: There is no built-in "Details" navigation option for custom pages, so the above is the recommendation for implementing such navigation. Note also that the use of a detail page is recommended for editing custom entity data.