cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Creating a Dynamic Title with Multiple Values

Former Member
0 Likes
1,033

I currently have a title formula editor set up like this: =If(UserResponse("Enter value(s) for Appointment Type ID:") <> "") Then ("Appt. Type: "+[Appointment Type Detail Description]) Else ("")

This works fine if only one value is selected from the prompt.

But I also have the "Appointment Type ID" field in my query filter (prompt) as in list...so if a user were to select multiple Appointment Type IDs the title would read #MULTIVALUE.

How can I change my formula above to handle listing of the multiple IDs in my report title when a user selects multiple IDs from the prompt?

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Likes

Hi,

The report title can be dynamically changed according to the parameters send ate report level. Just copy the below code at title function,

="Report for the States "+ UserResponse("Enter value(s) for State:")

Even if you want to edit the format of the ;, u can replace it with '-' , ',' ... using below,

="Report for the States "+ Replace( UserResponse("Enter value(s) for State:");";";", ")

This can be helpful for you. Please let me know if you need more information.

Regards,

Chitha.

Former Member
0 Likes

Tyler - You can do this.

Bo by default brings up semi colon between various the prompt values.

But you can use "Replace" function to actually replace that semi colon with commas.

here is the syntax.

=Replace(UserResponse("Enter value(s) for State:");";";", ")

I have replaced semi colon with comma and a space.

Hope this helps.

Former Member
0 Likes

I would like it to return this for example when multiple values are chosen from the prompt "Appt. Type: 21 - New Ob, 1 - Off Visit, 3 - Compl Phy, 5 - Pre Op"

The above example is if a user selects Appointment Type IDs: 21;1;3;5. The New Ob, Off Visit, Compl Phy, and Pre Op descriptions are held in the Appointment Type Detail Description field. These descriptions correspond with the Appointment Type IDs. I would like to be able to bring them together like in my example above by using both dimensions.

Former Member
0 Likes

My formula didn't copy over correctly, it is:

=If(UserResponse("Enter value(s) for Appointment Type ID:") <> "") Then ("Appt. Type: "[Appointment Type ID]" - "+[Appointment Type Detail Description]) Else ("")

Which for example could return "Appt. Type: 21 - New Ob"

21 being the value for the Appointment Type ID field and 'New Ob' being the value for the Appointment Type Detail Description field.

The issue is with how this formula is arranged if I choose multiple Appointment Type IDs from the prompt I get the #MULTIVALUE result.

I would like it to return this for example when multiple values are chosen from the prompt "Appt. Type: 21 - New Ob, 1 - Off Visit, 3 - Compl Phy, 5 - Pre Op"

Former Member
0 Likes

Sorry. This is right. Troubles with plain text.

=If(UserResponse("Enter value(s) for Appointment Type ID:") != "") Then ("Appt. Type: "+[Appointment Type ID]+" - "+[Appointment Type Detail Description]) Else ("")

Former Member
0 Likes

Can you tell me how do you want the title to display when there are multiple Appointment Types.

It is not a table & I don't think you can display it in single cell.

Former Member
0 Likes

I would rather create a concatenated filed in Universe for your Account Type ID and Description. Then prompt on that, and then use it in header.

The way you are doing, you could just display multiple ID's in the header, but it might not be possible to display corresponding descriptions.

Thanks.

Former Member
0 Likes

So I created a concatenated field at the universe level and am able to get the information I need in my title.

Now, how can I format the result in order to have spaces between each value?

Like this, using your state example above: Report for States - CA; CO; MO; NV; OK; TX

Former Member
0 Likes

Hi,

In your syntax above, what is "Appointment Type Detail Description"

As far as displaying header from the prompt answers(even with selection of multiple values with prompt) should be no problem. But I see the problem is with "Appointment Type Detail Description". Is this another Attrbute, try taking it out.

Here is a sample syntax that works.

="Report for States - " + UserResponse("Enter value(s) for State Name:")

Here is the output how it displays:

Report for States - CA;CO;MO;NV;OK;TX

Thanks