watsonx Assistant

watsonx Assistant

Conversational AI for fast and friendly customer care

 View Only
  • 1.  SpEL in WA, issue with colon

    Posted Wed October 09, 2024 10:02 AM
    Edited by KENNY CHUA Wed October 09, 2024 10:04 AM

    Hi, I'm looking for help with Watson Assistant.

    I am calling TRIRIGA OSLC API's. The problem I have is the field names in the response all are prefixed with a namespace. example spi:triNameTX I am trying to use the .joinToArray templating to get it to display multiple result rather than having to hardcode the index one by one. for example: context.space_lookup = context.step_469_result_1.body['rdfs:member'][0]['spi:triNameTX'].

    And my display expression is: context.step_469_result_1.body['rdfs:member'].joinToArray("Space %e.spi:triNameTX%").

    I've tried escaping it context.step_469_result_1.body['rdfs:member'].joinToArray("Space %e.spi\\:triNameTX%") but it turns the entire line into Text. But at least I know .joinToArray works, because I get this: "Space %e.spi\\:triNameTX%Space %e.spi\\:triNameTX%Space %e.spi\\:triNameTX%"

    Does anyone have any ideas on how to change the field name? I know it can't be done in the OPEN API doc, SpEL in WA doesn't take loops or any functions does it? What are my options?

    Thank you!!

    Kenny



    ------------------------------
    KENNY CHUA
    ------------------------------



  • 2.  RE: SpEL in WA, issue with colon

    Posted Thu December 05, 2024 01:24 PM

    Hi Kenny, 

    I see that your question has gone unanswered for far too long, were you able to get the issue resolved?

    Nick

    AI Community Manager



    ------------------------------
    Nick Plowden
    AI Community Engagement
    IBM
    ------------------------------