A Page on which you can Create, edit and delete Data items is very handy and easy to create.
1. Create an Empty User Flow
In this example we use the Data item Month.
- Create the Empty User flow Months. Do not use the Wizard.
2. Add a Details Page
-
Add the Page Details. At the end of this article, it will look like below.
-
Change the layout to Two (50 x 50).
-
On the left side: insert a Whole block with a Table in it.
-
The Table shows data from the Data item Month. Choose to show all data from Month, select all Properties and sort on number.
-
On the right side: insert the Stacked layout.
-
Add one Form field: a Data item that refers to Month. Show at least the Properties Number and Name.
-
The User is able to pick one Month.
-
Apply this Filter:
-
Name the label Selected month.
-
The Form field is not required.
-
Prefill the field with the Month that is selected on the left side of the Page.
-
Now add Multiple Form fields. Show all the fields of Month and Pre-fill them with the values from the selected Month. Where needed, make the fields Required.
3. Complete the User Flow
Below are the steps to complete this User flow. At the end of this article the User flow will look like below.
Create or save
The Save button has two functions:
- When the User did not select a Month, it will create a Month based on the content of the fields on the right side of the Page.
- When the User did select a Month, it will update the selected Month.
Add the Button
- Add a Button to submit the form.
- There is no additional Rule.
- Add the Decision Selected month is empty.
Create Month
- Add the Flow part Create Month where the Decision is True.
- Fill the Properties with the values from the fields on the right side of the Page.
- You can insert a Page that informs the User that the item was created.
- Connect with the Details Page.
Update the selected Month
- Add the Flow part Update Month where the Decision is False.
- Fill the Properties with the values from the fields on the right side of the Page.
- You can insert a Page that informs the User that the item was updated.
- Connect with the Details Page.
Delete the selected Month
- Add the Button Delete to the Details Page.
- Add the Flow part Delete Month.
- Connect with the Details Page.