0
votes

I'm simply trying to get all Answer by following ROQL

SELECT A FROM Answer A

This returns answers but when I see Solution's value, it contains $variableName. I have the variable configured and see it properly in preview, but how can I get complete Solution value after $variableName gets translated to actual content through the Rightnow SOAP API?

2

2 Answers

1
votes

As you have discovered, the API presents the raw solution string and not the calculated string with variables replaced. This happens for a number of reasons; the UI is aware of interface / language, calculations or other variable changes at run time, and more. Therefore, the SOAP API isn't aware of the context of the variable to replace it at query time through ROQL. Depending on how your variable is constructed, you would probably need to programmatically replace the variables based on logic behind that variable in your answer.

As a side note, selecting all answers through an object query (instead of a tabular query for just the fields that you want) can be expensive (technically). What's the business case behind selecting all answers in this way?

1
votes

Use Knowledge API instead - variables will be replaced with actual values.