Welcome back! 👋
In this tutorial, we’ll walk through three essential Pega skills you’ll use in almost any real application:
- Importing a CSV file into a Data Type
- Searching and displaying records using a Data Page / Data Type
- Creating an Auto-Complete field with visibility conditions
Let’s get started.
1. Importing CSV Data into a Pega Data Type
First, open the Data Type you created in a previous lesson.
We’ll be importing a CSV file into it—make sure you have your file ready.
Step 1 — Import the CSV
- Open the Data Type.
- Go to the Records tab.
- Click Import and upload your CSV file.
- Click Next.
Step 2 — Map Source to Target Properties
Pega will display each column from the CSV.
Map each one to the correct target property, for example:
first_name→ FirstNamelast_name→ LastName
(Complete all mappings based on your CSV.)
Step 3 — Configure Import Options
You can choose how Pega updates existing records:
- Always update
- Update if blank
- Update if source is not blank
For this example, select Always update.
Step 4 — Match Existing Records (Optional)
If your Data Type already contains data, you can match rows by a unique ID.
We do not have IDs in this example, so we’ll select FirstName as the match key.
Click Next.
Step 5 — Validate and Import
Give the import a name, then:
- Validate the file
- Confirm there are no errors
- Click Finish
Your Data Type will now show all imported records—hundreds of rows ready to use!
This is extremely useful when populating lists such as countries, states, cities, or any reference table.
2. Building the Customer Search Auto-Complete
Now let’s go back to our case flow.
We’ll create the first assignment form where users search for an existing customer.
If the customer isn’t found, we’ll later add a button to create one.
Step 1 — Open the Section
- Open the Flow Action.
- Open the Section rule.
- Switch to the Full Section Editor.
This is where we build the customer search UI.
Step 2 — Add an Auto-Complete Field
- From the palette, go to Data Capture → Auto Complete.
- Drop an auto-complete field on your form.
- Set the Target Property (create a new property if needed).
Step 3 — Use a Data Source
Auto-completes can source from:
- A data page
- A clipboard page
- A report definition
- A property
Because our customer data is stored in a Data Type, we will use a Data Page List.
⚠️ Important: A Page List Data Page must be used to return multiple results.
A single-record Data Page only returns one item based on a parameter, so it won’t work for autocomplete.
Step 4 — Select the Data Page List
Choose the Data Page List created from your Data Type.
Then configure the search results:
- Search field:
FirstName - Display fields: First Name, Last Name
- Identifier:
.pyGUID(the unique ID)
Step 5 — Add the Hidden Customer ID Field
Create a property to store the selected ID.
When the user picks a name from autocomplete, we’ll capture the GUID silently.
Now save the section and test it.
3. Testing the Auto-Complete Search
Open the User Portal and create a new case.
Start typing in the Customer field:
- Type C → Suggestions appear
- If no exact match exists, it shows similar names
- Example: Typing “Cri” may show Cristian
This works perfectly for large datasets.
Avoid dropdowns when you have hundreds of rows—autocomplete is the correct approach.
4. What’s Next? Visibility Conditions
Now that customer selection works, the next step (in a future tutorial) is adding conditional fields.
For example:
- Show address fields only after a customer has been selected
- Reveal a section only when the customer is new
We will configure visibility based on the selected customer’s ID or property values.
✨ Final Thoughts
In this tutorial, you learned how to:
✔ Import CSV data into a Pega Data Type
✔ Map and validate records during import
✔ Build an auto-complete search field using a Data Page List
✔ Capture the selected record’s unique ID
✔ Test your search functionality in the User Portal
These skills are essential for building real-world Pega applications using best practices.





