Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Append XML Data to create Drop Down List

Avatar

Level 4

I am using Query Multiple Rows as XML to call a stored procedure that returns a list of employees (below is the exact XML structure).  I need to extract out the full_name from the XML on all nodes an return that through a data connection into my form for a drop down.

Right now all I can do is create one huge string with the names.  I tried using concat but I can't append a new line character into concat.

---------- Begin XML Structure --------------------

<employees>
     <employee>
          <employee_id type="varchar">123456</employee_id>
          <first_name type="nvarchar">John</first_name>
          <last_name type="nvarchar">Public</last_name>
          <middle_name type="nvarchar">Q</middle_name>
          <name_suffix type="nvarchar"></name_suffix>
          <preferred_name type="nvarchar">John</preferred_name>
          <full_name type="nvarchar">Public, John</full_name>
          <network_user_id type="varchar">jpublic</network_user_id>
          <job_code type="char">APPSYS</job_code>
          <job_title type="nvarchar">APPSYS</job_title>
          <job_level_code type="char">45</job_level_code>
          <job_level_description type="nvarchar">Manager Benefit Level</job_level_description>

     </employee>

</employees>

---------- End XML Structure --------------------

Thank you in advance!

John

0 Replies

Avatar

Level 10

1. Instead of new line character, You can concatenate string with some special character(s) say ' | '

2. The other way is returning a list of strings (create a list variable of string subtype)

Nith

Avatar

Level 4

I have tried creating a list with a subtype of strings but can't get it to work. Any thoughts?

Thanks,

John

Avatar

Level 4

I wasn't able to import the LCA file.  Here is the error I received.

Error previewing archive: 'C:\WINDOWS\Temp\adobejb_server1\ArchiveStore\1202\Xml_to_DropDown\1.0\NewForm1.pdf (The system cannot find the path specified)'

Thanks,

John

Avatar

Level 10

I will resend the archive later today.

Nith