Skip to Content

Support for catch of prompt answer

I work on a report based on a query with three prompts:

In my example below the prompts are:

  1. "Räkenskapsår//period"
  2. "Ansvarigt Kostnadsställe/grupp (Optional)"
  3. "Företag (Optional)"

I want to catch the user respons for each promptanswer.

With the function PromptSummary I catch:

" *** Query Name:Ack ***

    Räkenskapsår/period SEP 2015

    Ansvarigt Kostnadsställe/grupp (Optional)INFORMATION MANAGEME

    Företag (Optional)"

On Bob I found this:

Substr( PromptSummary() ; Pos( PromptSummary() ; "    " ) ;
( Length(PromptSummary()) +2 - (Pos( PromptSummary() ; "    " )*NumberOfDataProviders())) / NumberOfDataProviders() )
; ";" ; ", ");"    ";"")

wich results in

"Räkenskapsår/period SEP 2015

Ansvarigt Kostnadsställe/grupp (Optional)INFORMATION MANAGEME

Företag (Optional)"

That's a start, but not what I want.

Instead I were trying with this:

=Substr(PromptSummary();Pos( PromptSummary() ; "period" )+7;8)

This gets exactly what I want: "SEP 2015"

Not so nice to search for a word in the promptstring, and not so nice to manually enter how many characters to add for start of substring.

When it comes to next promptanswer it's harder to perform:

With this try:

=Substr(PromptSummary();Pos( PromptSummary() ; "grupp" )+16;100)

I get not only the promptanswer, I get the hole tail of the string. Of course I could try to check how long the string is. But I am at the point to ask for a function I haven't found in webi:

I want a function that takes care of this, something like:


In my case


which would give me "SEP 2015" from my example.

This function would be permissive for if the query or object would change name or structure. I think its cool with all the substringing but its very intolerant. 

Or is there any other way that I have found yet?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 26, 2015 at 02:46 PM

    Hey Henrik,

    Create the below 3 variables to get the prompts answers separately. Make sure you have the exact same text as you see in the prompt, you can't miss anything, except for that "Optional," if you didn't add that manually.

    1. v_UserResponseforPrompt1 = Userresponse("Räkenskapsår//period")
    2. v_UserResponseforPrompt2 = Userresponse("Ansvarigt Kostnadsställe/grupp")
    3. v_UserResponseforPrompt3 = Userresponse("Företag")

    Mahboob Mohammed

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2015 at 02:45 PM


    Have you tried with userresponse function?


    replace the "Räkenskapsår//period" with he exact text of the prompt.


    Add comment
    10|10000 characters needed characters exceeded