This article provides step-by-step instructions on how to add a customized message based on the currently logged-in user. For this message to be created, your DataPage must be authenticated. You will be using parameters to pull information from the authentication table to display it directly to the end-user. This technique can be used for any field in your authentication table and on any authenticated DataPage. In this example, you pull in the first name of the logged-in user and display a custom greeting to that user. 

Steps: 

  1. Note the exact fieldname(s) you want to reference. 
    1. Open the authentication table or view that was used to password protect your DataPage. 
    2. Copy the fieldnames you want to reference in your message. In this example, we are going to pull the First_Name field. 
 

 
  1. Edit a DataPage you would like to change. Apply the following configurations:
    • Restrict access to the DataPage through Authentication
    • Proceed to a Configure Fields screen. You can add parameters into any portion of a DataPage including header and footers, HTML blocks, labels, etc. In this example, you add a greeting to the header section.  
    • Insert Header & Footer
  1. Inside the header section, construct your authenticated parameter. You can pull data directly from the authentication table (or view) by creating a parameter using the following format: [@authfield:FieldName]. It is important that “authfield:” is included before the fieldname. This tells the DataPage to pull the data from the authentication table (or view) and not from the base table. In this example, the parameter would be [@authfield:First_Name].
  1. Write a message using the new parameter. In this example we are pulling the first name data to say, “Hi, John! Here are today’s Inquiries:” (John will be replaced dynamically with the first name of the currently logged-in user). Some HTML formatting has also been added. 
  1. Save the changes.
  2. Optional: Preview your message either directly in Caspio or on your webpage to verify formatting and placement are as expected.