Create an Approval Process for New Records

 

When creating an app that allows end-users to submit new records you may find it necessary to add an approval process so that new records can be reviewed before they are published to the general public.  This article will show you how to set all new records to inactive then review and publish submissions through an internally facing DataPage.

Include Only Approved Records

Steps to create an approval process:

1.  Add an approved checkbox to the base table

  1. In the Caspio Bridge Explorer window go to the Tables view.
  2. Select the table that holds all of your public facing records and open the Design view by clicking on the Design button.
  3. In the first available row enter the fieldname “Active” and set the data type to Yes/No.
  4. Close the table and click the Yes button to save when prompted.

Active Field with a Yes/No Data Type

All of your records will be marked inactive by default.  You may want to mark all of your current records as active either individually, or by downloading the current table to an Excel workbook, setting all of the values of the Active column to “TRUE” and then importing the data back into Caspio Bridge using the “Replace” option.

2.  Filter the published records so only approved records are visible

  1. In the explorer window, go back to the DataPages view.
  2. Select the Report DataPage that your public end-users use to view records.
  3. Open the DataPage wizard by clicking the Edit button.
  4. Proceed to the Select Search Fields screen.
  5. Move the Active field created in step one to the right-hand column using the arrow buttons.
  6. Click Next.
  7. Select the Active field in the DataPage Elements panel and using the Form element dropdown menu, select hidden.
  8. Click on the Default Value checkbox to change the default value to “Yes”.
  9. Click Finish to save your DataPage.

Filter Based on Active Being Checked

Now only records with the active checkbox checked will appear visible to your end users.  If you have not yet marked any records as active as explained in step one, all searches will return “no records found”.

3.  Create a search and report to view and publish unpublished records

In order to view the records internally before they are published to the public we are going to create a second DataPage.

  1. Select the public facing DataPage and press the Copy DataPage button.
  2. Rename the page to indicate it is for internal review of records.
  3. Open the DataPage wizard by clicking the Edit button.
  4. Proceed to the Configure Search Fields screen.
  5. Select the Active field in the DataPage elements panel and change the form element to Radio Buttons.

Now you can choose to view only active or inactive items or both when you search.

Search Based on Active and Non-Active Record Status

4.  Change the details page to allow modifications of individual fields

  1. Proceed to the Select Details Page Fields screen.
  2. Move the Active field to the right-hand panel using the arrow button.
  3. Click Next.
  4. Because this DataPage will be internal, you can change the default Display Only setting to an editable form element.  For example, using the Form element dropdown, change the Active field to a check box.

Choose Using a Checkbox Element

Now when you use this DataPage you will be able to edit any mistakes in the fields as well as mark the individual record as active.