How to get a return value from a C# program?


Hello, as you can see in the image, I have this logic that I’ve seen in other conversations, basically it calls a PowerShell script, who inside makes a dotnet run C# Program. In that C# program I have a logic that returns a DataTable type. But the flow in the Pega Robot Studio, is only possible to return outputs coming from WriteLines or Prints.

Is there a way to get the return of a method and put it in the Result of the StandardOutput and then use it as I need?

could you try to convert your DataTable into a json string format or a csv and utilize that within the studio

Yes, I made it that way, I converted the DataTable into a JSON String and use it in the Studio.

1 Like