cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

need to have 2 different outputs in a service

Irfan_Pasha
8-Gravel

need to have 2 different outputs in a service

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

3 REPLIES 3

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

How can i pack,

can u pls give an example

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.

Top Tags