on 10-26-2015 2:30 PM
I work on a report based on a query with three prompts:
In my example below the prompts are:
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:
Replace(Replace(
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:
promptanswer(dataprovider;promptdimension;headeroption;userrespons)
In my case
prompt_period=promptanswer(query_A;räkenskapsår/period;No;Value)
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?
/Henrik
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.
Thanks,
Mahboob Mohammed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Have you tried with userresponse function?
=userresponse("Räkenskapsår//period")
replace the "Räkenskapsår//period" with he exact text of the prompt.
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.