DocumentList to Document

Hi,

I have a SelectSQL service that returns a DocumentList having three fields (EMPLOYEEID, ENAME, SAL) in each Document. How to convert the DocumentList to Document by using Built-in service documentListToDocument. Is it possible?
If so, what values we need to pass to “name”, “value” fields (input fields of Service In variables of documentListToDocument service) ?

Thanks
Trinadh

AFAIK … you can use docListTodoc with 2 fields…
in name-empid and value-ename final doc will be empid,ename… in one doc

Doclist:

  1. empid- 101 & ename-test1
  2. empid- 102 & ename-test2

Result:
Doc

  1. 101 & test1
  2. 102 & test2

–shaik

Steps:

  1. In input tab. create a inputDocumentList
  2. Add two strings under the doc list.
    for ex : inputList
    - emp id
    - salary
  3. Use pub.document:documentListToDocument
  4. In pipeline tab, map the input list to documentList
  5. right click on name field and set the value as emp id
  6. right click on value field and set the value as salary
  7. run the service

the output will be
doc

  • name(emp id details)

  • value(salary)
    i hope it helps. :slight_smile:

  • pragadeesh.r

i also think that the document should have name/value pair which means either
emp id/salary OR emp name/salary please choose according to ur proj needs.