user interaction node
Data modeltab in the modeler. We are going to arrange all the search fields in a separate folder (e.g. Search fields) so we can distinguish these search fields from the 'Company' data model list.
New folderand name the folder 'Search fields'.
Search fieldfolder named 'Search Company Name'.
data model list. Then you can use these filters in
Filtersand create a
New filter. Name the filter "Search Company Name" and use the
expression editorto give the filter a purpose.
Filter expressionfield WEM Expression editor appears. Here we can define our filter expression. Here we want to filter our
Company list datagridby the input in the
Search fieldwhen that complies with the "Company Name" in the
datagrid. Therefore, we use the expression as shown below.
contains. This function checks if a string (text) contains another string (text). This check is not case-sensitive and ignores diacritics. For more details about functions, check our online documentation.
Technical name: now you can see the importance of the use of a technical name. With a technical name, you can distinguish between fields with the same display name (in this case Company name). One field belongs to the 'Company' list and the other to the search fields.
user interaction nodein the "Companies" flowchart.
datagrid. Select the
Create a Formoption to create the search field.
On change - Refresh Screenbehavior. Then, your datagrid will change when you enter a company name in the search field.
filteron the "Company" list. To do so, first select the "Company"
datagrid.Then click on the "Filter" button in the
datagridfilter "Search on company name".
Tip: don't forget to
user interaction node. We are going to use a green
flowchart. Drag and drop a green
assignment nodeonto the canvas.
Note: the default
Actionof the green
assignment nodeis 'New value'. To flush the value of the 'Company name' search field, change the
Actioninto 'Clear value'.
assignment nodeto the
Startnode and the
interaction node. The result should look something like this:
flowcharts, but also in
user interaction screens.
database("Company list"), but also in the
interaction screenafter we use the search function. If the list or
datagridis empty (no company record at all) we want to present a clear notification on the screen.
flowchartand open the "Company overview"
user interaction node.
conditional widgetto the interaction window. Thereafter, we give our condition in the
expression editor. We want to know whether our
datagridis empty, or the search gives a
datagridthat is not empty (i.e. the amount of companies in complience with the search is not zero).
datagridis empty. Therefore, we place the
datagridin the top box of the condition, which shows when the first statement of the condition is false. And we place the an alert in the bottom box, when the first part is true and the second part is false.
datagriddoes not match the search field. Test it yourself.
yellow decision node. The goal for this feature is to show an alert notification on the "Companies" user interface when the "Companies" list is empty.
yellow decision nodeonto the canvas.
WEM Expression editorappears. Use the expression "Count([Company])=0", since we want to show an alert if the Company list is empty.
user interaction nodeand name this "Notificaton". Now we connect our
decision nodeto the "Notification"
interaction nodevia the "Yes" exit, and to the "Search company name"
assignment nodevia the "No" exit.
user interaction node. Name one Exit "Home" and one "Add company". After the notification shows, we want our users to either add a company to start filling the "Companies"
database list, or to return to the "Home" screen.
action nodevia the "Add company" exit we just created. Furthermore, we create a new
navigation nodeto that will navigate back to the "Home"
flowchart, which we will connect to the "Notification" node via the "Home" exit we created.
sub-flowchartto connect to the "Count([Companies])=0"
decision node. We do that because when all companies in the
databaseare delete, we would also like to show the notification as well.