Header as Output in Connector Function

Hello! I was wondering how I would go about creating an output variable in a connector function for something in the header? In my case, I want to output the string associated with “nbv-error-message” (see red circle). My end goal is to be able to use a variable to display this on the UI. Thanks in advance!

1 Like

hello @aparnaalavilli and welcome to the Tulip Community!!

that’s a great question. to add an Output from the Header, you can hover over the Output you want to use from the Header and you will see that Add to output shows up (server in this example):

once you do that, you will see the Header has been added to the Outputs and can be used in your apps:

let us know if this works for you and if you have further questions.

again, welcome to the Tulip Community!!

Thank you! This is helpful and I’m able to extract from the header now. For visualizing these outputs though, it seems like I’m limited by the output data type. For instance in my case (see screenshots), I would like to use the workorders array in my table output, but then have the error message text in a separate variable to display outside the table. Is this currently possible? Or do I need separate connector functions for different output types? The only problem there is that the error code would be specific to the workorders array that was returned.

hello @aparnaalavilli, it should indeed be possible to do what you’re describing. as you can see here, I’m extracting both the Body (forecast, that is an array) and the Header from the response:

can you try removing the . (dot) in .nbv-error-message, so it’s only: nbv-error-message??

let us know if that works for you!!

1 Like

Yes that worked, thank you!!

1 Like