Using a Form for Portal Pop-Up POST Methods
  • 27 Nov 2023
  • 4 minute read
  • Dark
    Light
  • PDF

Using a Form for Portal Pop-Up POST Methods

  • Dark
    Light
  • PDF

Article Summary

Overview and Setup

Portals can take advantage of forms to updates data on a record, eliminating the need for a custom SQL POST method entirely.

This article illustrates this function by way of a Briefcase example. You will use briefcase to import a form that connects to an athletics portal.

The portal features a pop-up that allows coaches to update sport rating and position, as well as see the checklist items relating to the rank-one application for the person record.

The changes made in this pop-up will be reflected in the student's profile tab under the  Sports modal at the right. 
Completed_Portal_Function_-_Popup_-_Make_Updates_-_Reflected_in_Record_-_pt._1.png Completed_Portal_Function_-_Popup_-_Make_Updates_-_Reflected_in_Record_-_pt._2.png

Five Steps You'll Take:

  1. Enable Configurable Joins in Forms/Events.

  2. Use Briefcase to import two Slate Showcase objects.

  3. Connect the portal to the form.

  4. Recreate merge fields on the form.

  5. Test the portal: updates in the portal should be reflected on the student's record.

Enabling Configurable Joins in Forms/Events

The procedures in this article require the activation of Early Access feature Configurable Joins in Forms/Events. To enable it:

  1. From the main navigation, select Database.

  2. From the Configurations section, select Configuration Keys.

  3. From the Database Configuration section, select Early Access Features.

  4. Select Research, then click Save.
    Early_Access.png

As with all configuration changes, the effect may take up to 15 minutes to be reflected across all web nodes.

Briefcase Imports

Two briefcase imports are required to follow the procedures in this article. Be sure to open and re-save each form field to break any potential cache from the briefcase import.

Slate Examples

Portal: Athletics Portal with Form Pop-Up

ca8eb78a-9292-cde3-b368-ad0e4ebbd67e@slate-showcase
Athletics_Portal.png

Form: Sport Update Form for Athletics Portal

eb02ff28-4faa-2216-ee34-105cf4986ed1@slate-showcase
Athletics_Form.png  

Configure the Portal

  1. From the main navigation, select Database.

  2. From the Portals section, select  Portals. 

  3. Select Athletics Portal with Form Pop-Up.

  4. Under Views, select Pop-up: Athlete Details Form

  5. Double-click the Embedded Form

  6. From the Form list, select Athletics - Sport Update Form for Athletics Portals.

  7. Select Submission Behavior, Popup, and Query String Parameters.
    By enabling passing form-related query string parameters into the form, we can merge in the sport ID and other information the coach needs. This also avoids the creation of a new sport.

  8. Click  Save. The embedded form populates. 
    Edit_Part_-_Form.png  

Configure the Form

Your title goes here

Your content goes here

  1. From the main navigation, select  Forms. 

  2. Select Sport Update Form for Athletics Portal.

  3. On the right, click  Edit Form.

  4. On the right, click Edit Properties.

  5. Select  Multiple and Require secure link/login. Under Layout, select  Table. 

  6. Click  Save. 
    Edit_Form_Properties.png

  7. Click Edit Properties.

  8. In the Merge Fields tab:

    1. Click Join, then select Person.

    2. Click  Save. 

    3. Click Join again, then select Application by Rank and entering "1" OR Application and filtering as needed.

      • Since the join from Person to Application can be a one-to-many relationship (a person record may have multiple applications in your instance), you'll need to tell Slate which application to join to.

        The simplest option is to join from Person to Application by Rank and select the rank one application.

        For more on how Slate determines table ranking, please refer to Determination of Table Ranks.

        With these joins in place, you have access to person records and their rank one application. 

  9. Still within the Merge Fields tab, click  Export

  10. Under Person, select  Name. 

  11. Click Continue.

  12. Double-click the export to edit it: 

    • In the Name field, enter person_name
      Note: All merge field exports require computer friendly names. That is: lowercase and without spaces.

    • Set Format Type to String. 

  13. Click Save.

  14. Still within the Merge Fields tab, add additional exports as desired. Two examples are provided in the following sections. 
    Joins.png
    Rank_1_Application.png
    Finished_Joins.png

 Create the Merge Field Exports

Make note of the instructions form field at the top of the form. It is preconfigured with merge fields that display the student's name, application, and checklist information to the coach using the portal.
Instructions_Form_Field.png

Merge fields do not persist through Briefcase imports and must be recreated. A number of merge fields exist in the body of this form, including:

Merge_Fields_in_Source.png

  • person_name (which we've already created in the Form Properties menu)

  • application

  • checklists

  • status_image

  • status

  • subject

  • date

The following two sections create the remainder of the corresponding merge fields in Form Properties.

Important!

For the merge fields in the portal and form provided for this article to pull data properly, names of exports must match those provided in the following sections exactly. Copy and paste text from this article for best results.

Application Header and Decision Name

You can make use of subquery exports in your merge fields. These examples return the application header and the decision name (or, if no decision exists, the application status).

Within the form, click  Edit Properties, then click the Merge Fields tab. 

Click Subquery Export.

  1. In the Name field, enter "application"

  2. Set Output to Concatenate.

  3. Click Export. 

  4. Under the Application section, select  Header.

  5. Click  Continue. 

  6. Click Save.
    Subquery_Export_-_application_-_Concatenate_-_Application_Header_Export.png

Click Literal.

  1. Add a literal value of your choice to space out the export values.

  2. Click Save.
    Literal.png

Click  Subquery Export.

  1. Set Output to  Formula. 

  2. Click Join.

  3. Under Application by Rank, select  Decision by Rank Released. 

  4. Click  Continue.

  5. In Rank Released, enter "1".

  6. Click  Save.
    Join_-_Decision_by_Rank_Released_-_Rank_1.png

    Decision_Export.png

Within the subquery export, click Export again.

  1. Under Decision by Rank Released, select Name.

  2. Click Continue.

  3. Double-click the export to edit it.

  4. Enter a computer-friendly name, like "decision".

  5. Click Save.

  6. In the Formula box, enter the following:

    isnull(@decision, @status)
  7. Click Save.

Click  Save again.
isnull_Code.png

Checklist Items

Add checklist items to the portal pop-up if they're present in a student's application.

Within the form, click  Edit Properties, then click the Merge Fields tab.

Click  Subquery Export.

  1. Enter a computer friendly name, like "checklists"

  2. Set Output to Dictionary.

Within the checklists subquery export, click Join. 

  1. Under  Applications by Rank, select  Checklists.

  2. Click  Continue. 

  3. Click  Save. 

Subquery_Export_-_checklists_-_Dictionary_-_Join_to_Checklists.png

Still within the checklists subquery export, click Export.

  1. Under Checklists, select Fulfilled Date, Status, and Subject.

  2. Click Continue.

  3. Edit the names of the exports to "date", "status", and "subject", respectively. Within date, set Format Type to Date and enter "MM/dd/yyyy" in the Format Mask field. 

Exports_-_Status_Subject___Fulfilled_Date.png

Checklists_Fulfilled_Date.png

Still within the checklists subquery export, click Subquery Export. 

  1. Enter a computer friendly name, like "status_image"

  2. Set Output to  Formula.

  3. Paste the following into the Formula field:

    (case @status
    when 'Received' then 'ok'
    when 'Waived' then 'waived'
    else 'cancel'
    end)

status_image.png

Within the status_image subquery export, click Export. 

  1. Under Checklists, select Status.

  2. Click Continue.

  3. Double-click the export to edit. Enter a  computer-friendly name, like "status".

  4. Click  Save. 

  5. Click Save again.

(Optional) Back in the checklists subquery export, click Filter.

  1. Under Checklists, select  Section. 

  2. Click  Continue. 

  3. Include or exclude as many sections from the results as suit your process.

  4. Click  Save.

(Optional) Again in the  checklists subquery export, click  Sort.

  1. Under Checklists, select  Section and  Subject. 

  2. Click  Continue. 

Click  Save.

Optional_Filter_and_Sorts.png

  Adding sorts to the checklist subquery export presents checklist items for coaches in a consistent fashion. The example pictured sorts alphabetically by section, then by subject.


Was this article helpful?