Step \Cast object to type\"type is string array"

Step \Cast object to type\"type is string array"

Comments

  • Hi,\r\nI need to use the step \"Cast object to type\

  • [quote=andrew.paterson@decisions.com]Hi ildanny,\r\nUnder [i]Type to Try[/i] you could try StringListResult. This should help you cast your object to a list of strings.\r\nI hope this helps!\r\nRegards,\r\nAndrew[/quote]\r\n\r\n\r\nHi,\r\nthanks for the answer, but it didn't work.\r\nThe input type is an array of string and your type is a step.\r\nThe step \"Cast Object to Type\" goes through the path \"no match\".\r\n\r\nDecisions is built on top of .Net, so I imagine that internally is compiled like \r\n string[] MyVariable = {\"one\

  • Hi ildanny,

    I apologize for the incorrect information. I may have found an option for you to use though. If you use the [i]Object Properties To Data Pairs [/i]step, a list of data pairs holding the field and value will be created. From here, you can access either all of the values or all of the field names of your object by selecting All Name or All OutputValue. In the example attached, I have used the create data to create a string list of all of the values for the fields of an object.

    I hope this helps you achieve what you are looking for.

    Regards,

    Andrew Paterson

  • Hi, found out that I can just ignore the error. I just assign my object to an array of strings. In a programming language this would be the equivalent of an implicit cast. It just worked.

  • Hi ildanny,

    Im happy to hear that you achieved what you were looking for.

    Regards,

    Andrew

Sign In or Register to comment.