Skip to main content
1-Visitor
December 23, 2019
Solved

need to have 2 different outputs in a service

  • December 23, 2019
  • 3 replies
  • 1747 views

Hi All,

I have an service,

in which i need 2 different kinds of outputs,

1 is infotable and another 1 is string types.

How can i do this ,

Please help.

Best answer by mneumann

Create a new result as InfoTable with a Data Shape like

 

  • output_one = InfoTable (with the Data Shape you already have, i.e.)
    • myNumber
    • myString
    • myBoolean
  • output_two = String

The InfoTables are nested.

It works the same way as giving back i.e. a multi-dimensional array.

3 replies

16-Pearl
December 23, 2019

Hi @Irfan_Pasha 

Services can only deliver one result (like any JavaScript function).

However you can pack it into an InfoTable, which will hold the two values you have (InfoTable + String)

 

Best Regards,
Michael

1-Visitor
December 23, 2019

How can i pack,

can u pls give an example

mneumann16-PearlAnswer
16-Pearl
December 23, 2019

Create a new result as InfoTable with a Data Shape like

 

  • output_one = InfoTable (with the Data Shape you already have, i.e.)
    • myNumber
    • myString
    • myBoolean
  • output_two = String

The InfoTables are nested.

It works the same way as giving back i.e. a multi-dimensional array.