Ever wanted to quickly create a value list for Oracle Policy Modeling from a comma-separated values (CSV) list or from some tabular data? In this blog post I’m going to show you how! All you need is an AI chatbot and a text editor like Notepad.
At a high-level this is how you do it:
- Copy your data into your AI chatbot of choice.
- Ask the tool to convert the data to XML format using example XML which you provide.
- Copy the XML returned by the AI chatbot into a text editor and save it as an .xml file.
- Import the XML file in to OPM as a value list.
Note that you need to have a basic knowledge of the XML format required by OPM for a value list. This will help you to write your AI prompts and check the XML output provided by the AI chatbot. Don’t be alarmed by this requirement if you are not a developer…it’s very easy to understand!
XML format for an OPM value list
The quickest way to familiarise yourself with the XML format for an OPM value list is to open a Policy Modeling project that contains a value list and export the value list to view the code.
For example, the Loan Advisor project contains a simple Liability Type value list that looks like this:
Here’s a basic overview of the XML:
- It starts with the XML declaration <?xml version="1.0" encoding="UTF-8"?>
- It defines a root element <lists> with the namespace http://xmlns.oracle.com/policymodeling/12.2.5/enumeration/types.
- Within <lists>, there is a child element <value-list>. This contains the name and type attributes. This indicates that it’s a list of Liability Types with text-based values. Tip: Valid data types are: "text", "number", "currency", "date", "datetime", "time" and "boolean".
- Within <value-list>, each list value is a <value> child element.
- Each <value> element contains a child value type element (in this case <text-val>) with the actual list value (Home loan, Car Loan etc). Tip: Valid value types are: text-val, number-val, date-val, datetime-val, time-val, boolean-val and uncertain-val.
There are additional attributes and elements used when having display values and for hierarchical lists (which will be explained later in this blog post) but this is enough to get you going.
Let’s start with a very simple example.
Example 1. Using a list of locations to create a value list
In this example I have simple, one column list of locations in a table in Excel:
From this I want a create a value list in OPM of these locations.
This is what I do:
- Open my AI chatbot and type a prompt like this:
I need to convert a list of values to XML. Here is an example of the target XML format:
START EXAMPLE
<?xml version=”1.0″ encoding=”utf-8″?>
<lists xmlns=”http://xmlns.oracle.com/policymodeling/12.2.5/enumeration/types”>
<value-list name=”locations” type=”text”>
<value>
<text-val>Austin</text-val>
</value>
<value>
<text-val>Broomfield</text-val>
</value>….
END EXAMPLE
Here is the tabular data I want you to convert:
START LIST
Location
Austin
Broomfield
Burlington
Chicago
Colorado Springs
Columbia
Deerfield
Denver
Irvine
Las Vegas
Lehi
Orlando
Pleasanton
Redwood Shores
Reston
Rocklin
San Antonio
Santa Clara
Santa Monica
Washington
END LIST
My helpful AI chatbot provides me with the list of locations in the specified XML format.
<?xml version=”1.0″ encoding=”utf-8″?>
<lists xmlns=”http://xmlns.oracle.com/policymodeling/12.2.5/enumeration/types” >
<value-list name=”locations” type=”text”>
<value>
<text-val>Austin</text-val>
</value>
<value>
<text-val>Broomfield</text-val>
</value>
<value>
<text-val>Burlington</text-val>
</value>
<value>
<text-val>Chicago</text-val>
</value>
<value>
<text-val>Colorado Springs</text-val>
</value>
<value>
<text-val>Columbia</text-val>
</value>
<value>
<text-val>Deerfield</text-val>
</value>
<value>
<text-val>Denver</text-val>
</value>
<value>
<text-val>Irvine</text-val>
</value>
<value>
<text-val>Las Vegas</text-val>
</value>
<value>
<text-val>Lehi</text-val>
</value>
<value>
<text-val>Orlando</text-val>
</value>
<value>
<text-val>Pleasanton</text-val>
</value>
<value>
<text-val>Redwood Shores</text-val>
</value>
<value>
<text-val>Reston</text-val>
</value>
<value>
<text-val>Rocklin</text-val>
</value>
<value>
<text-val>San Antonio</text-val>
</value>
<value>
<text-val>Santa Clara</text-val>
</value>
<value>
<text-val>Santa Monica</text-val>
</value>
<value>
<text-val>Washington</text-val>
</value>
</value-list>
</lists>
- I check it to see that it is in the correct format. I can see that:
- Within <lists>, a child element <value-list> is defined with the name “locations” and the type “text” ✔
- Within <value-list>, there is a child element <value> for each location from my list ✔
- Each <value> element contains a child element <text-val> with the actual location name ✔
- I copy this XML and paste it into my text editor. I then save the file as a .xml file. To do this, I simply provide a file name that ends with “.xml”. For example, “locations.xml”.
- I now open the Policy Modeling project that I want to import the value list into. I go to the Value Lists subtab on the Project tab and click Import. I select my saved XML file. OPM tells me that my value list will be added:
So I click OK and can now see my imported value list in the list of value lists for the project.
I open the value list and can see all the values from my original table in Excel.
Easy, right! Now let’s imagine I want to create a value list with display values that are different from the actual values…
Example 2. Using a CSV list of airports and airport codes to create a value list
In this example I have list of airport names and IATA airport codes in CSV format:
From this I want to create a value list in OPM where the value used in the rules is the airport code and the display value in the interview is the airport name.
Tip: The description attribute for the <value> element is used to provide the display for the value in OPM. To see an example of this, export the Temperature value list in the Energy Saver project in OPM.
This is what I do:
- Open my AI chatbot and type a prompt like this:
I need to convert comma-separated values to XML. Here is an example of the target XML format:
START EXAMPLE
<?xml version=”1.0″ encoding=”utf-8″?>
<lists xmlns=”http://xmlns.oracle.com/policymodeling/12.2.5/enumeration/types”>
<value-list name=”airports” type=”text”>
<value description=”Hartsfield-Jackson Atlanta International Airport”>
<text-val>ATL</text-val>
</value>
<value description=”Beijing Capital International Airport”>
<text-val>PEK</text-val>
</value>….
END EXAMPLE
Here is the CSV data I want you to convert:
START LIST
Airport Name,IATA Code
Hartsfield-Jackson Atlanta International Airport,ATL
Beijing Capital International Airport,PEK
Los Angeles International Airport,LAX
Dubai International Airport,DUB
Tokyo Haneda Airport,HND
O’Hare International Airport,ORD
London Heathrow Airport,LHR
Shanghai Pudong International Airport,PVG
Paris Charles de Gaulle Airport,CDG
Amsterdam Schiphol Airport,AMS
Hong Kong International Airport,HKG
Frankfurt Airport,FRA
Incheon International Airport,ICN
Changi Airport,SIN
END LIST
My AI chatbot gives me this:
<?xml version=”1.0″ encoding=”utf-8″?>
<lists xmlns=”http://xmlns.oracle.com/policymodeling/12.2.5/enumeration/types”>
<value-list name=”airports” type=”text”>
<value description=”Hartsfield-Jackson Atlanta International Airport”>
<text-val>ATL</text-val>
</value>
<value description=”Beijing Capital International Airport”>
<text-val>PEK</text-val>
</value>
<value description=”Los Angeles International Airport”>
<text-val>LAX</text-val>
</value>
<value description=”Dubai International Airport”>
<text-val>DUB</text-val>
</value>
<value description=”Tokyo Haneda Airport”>
<text-val>HND</text-val>
</value>
<value description=”O’Hare International Airport”>
<text-val>ORD</text-val>
</value>
<value description=”London Heathrow Airport”>
<text-val>LHR</text-val>
</value>
<value description=”Shanghai Pudong International Airport”>
<text-val>PVG</text-val>
</value>
<value description=”Paris Charles de Gaulle Airport”>
<text-val>CDG</text-val>
</value>
<value description=”Amsterdam Schiphol Airport”>
<text-val>AMS</text-val>
</value>
<value description=”Hong Kong International Airport”>
<text-val>HKG</text-val>
</value>
<value description=”Frankfurt Airport”>
<text-val>FRA</text-val>
</value>
<value description=”Incheon International Airport”>
<text-val>ICN</text-val>
</value>
<value description=”Changi Airport”>
<text-val>SIN</text-val>
</value>
</value-list>
</lists>
- I check it to see that it is in the correct format. I can see that:
- Within <lists>, a child element <value-list> is defined with the name “airports” and the type “text” ✔
- Within <value-list>, there is a child element <value> for each airport from my list ✔
- Each <value> element has a description attribute for the airport name, as well as a child element <text-val> with the IATA code ✔
- I copy the XML into my text editor, save it as an XML file (airports.xml) and then import it into OPM.
- I open up the value list in OPM and can see all the values from my original CSV list with the airport code used for the value and the airport name used for the display.
With that mastered, now let’s now try something slightly trickier but still very doable using an AI chatbot – creating a multi-level value list from multiple columns of data in Excel…
Example 3. Using multiple columns of data to create a multi-level value list
In this example I have 3 columns of data in a table in Excel:
From this I want to create a multi-level value list in OPM with the hierarchy:
- Region > Country > Office
Each level of a multi-level value list is a separate list of values. So I will need 3 values lists in OPM (region, country and office) where office is filtered by country, and country is filtered by region.
When creating hierarchical value lists:
- The <value-list> element has a child-list-name attribute that provides the name of the child list.
- Within <values> there are <child-values> elements that list the child values.
- The child-list-name attribute for the <value-list> element in the higher list must use the exact name of the <value-list> name attribute in the lower list. (You’ll see this in my prompt below.)
Tip: For an example of the format used for a multi-level value list, export the Department and Discipline value lists in the Pathfinder project in OPM.
This is what I do:
- Open my AI chatbot and type a prompt like this:
I need to convert a list of values to XML. Here is an example of the target XML format:
START EXAMPLE
<?xml version=”1.0″ encoding=”utf-8″?>
<lists xmlns=”http://xmlns.oracle.com/policymodeling/12.2.5/enumeration/types”>
<value-list name=”region” type=”text” child-list-name=”country”>
<value>
<text-val>Asia Pacific</text-val>
<child-values>
<text-val>Australia</text-val>
<text-val>India</text-val>
</child-values>
</value>
<value>
<text-val>North America</text-val>
<child-values>
<text-val>United States</text-val>
<text-val>Canada</text-val>
</child-values>
</value>
END EXAMPLE
I need 3 complete XML files.
The first XML file is to have the value-list-name as “region” and the child-list-name as “country”.
The second XML file is to have the value-list-name as “country”, and the child-list-name as “office”.
The third XML file is to have the value-list-name as “office”. It has no child values.
Here is the tabular data I want you to convert:
START LIST
Region |
Country |
Office |
Asia Pacific |
Australia |
Sydney |
Asia Pacific |
Australia |
Melbourne |
Asia Pacific |
Australia |
Canberra |
Asia Pacific |
Australia |
Perth |
Asia Pacific |
India |
Bangalore |
Asia Pacific |
India |
Chennai |
Asia Pacific |
India |
Delhi |
North America |
United States |
Miami |
North America |
United States |
Baltimore |
North America |
United States |
Nashville |
North America |
United States |
Denver |
North America |
United States |
Honolulu |
North America |
Canada |
Calgary |
North America |
Canada |
Montreal |
Europe |
United Kingdom |
London |
Europe |
United Kingdom |
Bristol |
Europe |
Turkey |
Ankara |
Europe |
Turkey |
Istanbul |
Europe |
Spain |
Madrid |
Europe |
Spain |
Barcelona |
END LIST
Hopefully, my AI chatbot gives me back 3 XML files like this:
XML File 1: Regions (categorizes countries under their respective regions)
<?xml version=”1.0″ encoding=”utf-8″?>
<lists xmlns=”http://xmlns.oracle.com/policymodeling/12.2.5/enumeration/types”>
<value-list name=”region” type=”text” child-list-name=”country”>
<value>
<text-val>Asia Pacific</text-val>
<child-values>
<text-val>Australia</text-val>
<text-val>India</text-val>
</child-values>
</value>
<value>
<text-val>North America</text-val>
<child-values>
<text-val>United States</text-val>
<text-val>Canada</text-val>
</child-values>
</value>
<value>
<text-val>Europe</text-val>
<child-values>
<text-val>United Kingdom</text-val>
<text-val>Turkey</text-val>
<text-val>Spain</text-val>
</child-values>
</value>
</value-list>
</lists>
XML File 2: Countries (categorizes offices under their respective countries)
<?xml version=”1.0″ encoding=”utf-8″?>
<lists xmlns=”http://xmlns.oracle.com/policymodeling/12.2.5/enumeration/types”>
<value-list name=”country” type=”text” child-list-name=”office”>
<value>
<text-val>Australia</text-val>
<child-values>
<text-val>Sydney</text-val>
<text-val>Melbourne</text-val>
<text-val>Canberra</text-val>
<text-val>Perth</text-val>
</child-values>
</value>
<value>
<text-val>India</text-val>
<child-values>
<text-val>Bangalore</text-val>
<text-val>Chennai</text-val>
<text-val>Delhi</text-val>
</child-values>
</value>
<value>
<text-val>United States</text-val>
<child-values>
<text-val>Miami</text-val>
<text-val>Baltimore</text-val>
<text-val>Nashville</text-val>
<text-val>Denver</text-val>
<text-val>Honolulu</text-val>
</child-values>
</value>
<value>
<text-val>Canada</text-val>
<child-values>
<text-val>Calgary</text-val>
<text-val>Montreal</text-val>
</child-values>
</value>
<value>
<text-val>United Kingdom</text-val>
<child-values>
<text-val>London</text-val>
<text-val>Bristol</text-val>
</child-values>
</value>
<value>
<text-val>Turkey</text-val>
<child-values>
<text-val>Ankara</text-val>
<text-val>Istanbul</text-val>
</child-values>
</value>
<value>
<text-val>Spain</text-val>
<child-values>
<text-val>Madrid</text-val>
<text-val>Barcelona</text-val>
</child-values>
</value>
</value-list>
</lists>
XML File 3: Offices (lists all the offices)
<?xml version=”1.0″ encoding=”utf-8″?>
<lists xmlns=”http://xmlns.oracle.com/policymodeling/12.2.5/enumeration/types”>
<value-list name=”office” type=”text”>
<value>
<text-val>Sydney</text-val>
</value>
<value>
<text-val>Melbourne</text-val>
</value>
<value>
<text-val>Canberra</text-val>
</value>
<value>
<text-val>Perth</text-val>
</value>
<value>
<text-val>Bangalore</text-val>
</value>
<value>
<text-val>Chennai</text-val>
</value>
<value>
<text-val>Delhi</text-val>
</value>
<value>
<text-val>Miami</text-val>
</value>
<value>
<text-val>Baltimore</text-val>
</value>
<value>
<text-val>Nashville</text-val>
</value>
<value>
<text-val>Denver</text-val>
</value>
<value>
<text-val>Honolulu</text-val>
</value>
<value>
<text-val>Calgary</text-val>
</value>
<value>
<text-val>Montreal</text-val>
</value>
<value>
<text-val>London</text-val>
</value>
<value>
<text-val>Bristol</text-val>
</value>
<value>
<text-val>Ankara</text-val>
</value>
<value>
<text-val>Istanbul</text-val>
</value>
<value>
<text-val>Madrid</text-val>
</value>
<value>
<text-val>Barcelona</text-val>
</value>
</value-list>
</lists>
- I check the three XML files to ensure that they each include all of my input data and that they are in the correct format. I can see that:
- The first XML file groups the regions (e.g. Asia Pacific, North America, Europe) and lists the countries as child values for each region ✔
- The second XML file groups the countries (e.g. Australia, United States, United Kingdom) and lists the offices as child values for each country ✔
- The third XML file lists the offices (e.g. Sydney, Melbourne, Canberra) without any child values ✔
- I copy the content of the 3 XML files from my AI chatbot into 3 separate files in my text editor and save each one as an XML file (regions.xml, countries.xml and offices.xml).
- In OPM I import each of the files, starting with the lowest value list in the hierarchy (offices), then the next list up (countries) and finally the highest value list in the hierarchy (regions). This is because the higher level lists reference the lists below them so I will get an error if I try to import them in a different order. Once the 3 files have been imported I can view them on the Value Lists subtab.
- I check that my 3 value lists are operating in a hierarchy as I expected by opening the region value list. Here I can see the relationship between the value lists.
country > office” height=”261″ src=”/ia/wp-content/uploads/sites/27/2025/10/OPM_Value_list_regions-1.png” width=”448″>
I want to do one final check to see that all my original data is in these value lists so I click the View Hierarchy button and can see all the values in the correct lists are there!
country > office” height=”586″ src=”/ia/wp-content/uploads/sites/27/2025/10/OPM_Value_list_hierarchy.png” width=”302″>
Tips
Preparing your list data for copying into an AI chatbot
- Include descriptive column headers in the first row of your tabular data, or as the first row in your CSV list. This will help the AI chatbot to understand the data that you are providing and enable you to refer to it in your prompts.
- Use one row per record.
- Don’t include empty columns or rows.
- Ensure that the order of data in your CSV is consistent.
Writing your AI prompts
- If you don’t want to provide an example of the XML format you require to your AI chatbot, you can try providing the XML schema definition (XSD) from the Intelligent Advisor documentation here.
- If your prompt is getting too long or complex, consider breaking a single prompt up into multiple prompts.
- If you have a long list of data, be sure to ask your AI chatbot for the “complete” XML file, otherwise it may just give you a subset of the data back.
- The more explicit you can be about the format you require, the better the result you will get!
- If you need any general help understanding XML, refer to the W3Schools XML Tutorial.
Importing your value list in to OPM
- If the value list is not in the correct XML format you will get a dialog that tells you that the value list import failed with the reason why. You may need to go back to your AI chatbot and fine tune the prompt.
- The name of the value list is derived from the value-list name in the XML file. If you want to rename it either change the name in the XML file before importing it or open the value list for editing after importing it and change it there.
- The value list is automatically created with <uncertain> as one of the values, even if this is not defined in the XML file.
Further information
If you would like further information on any of the concepts covered in this post, check out these topics in the Intelligent Advisor Documentation Library:
- Overview of Value Lists
- Associate a Value List with an Attribute Collected On a Screen
- Multi-Level Value Lists
- Example Policy Models
- Value List XML Format
Title image credit: Steve Johnson via Unsplash