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

Parse Error For @Prompt Object

Former Member
0 Likes
1,249

What would cause this error? I don't see anything wrong with the syntax.

Accepted Solutions (1)

Accepted Solutions (1)

amitrathi239
Active Contributor
0 Likes

Hi Jeff,

Can you please explain in detail what are you trying to achieve?

Amit

Former Member
0 Likes

The 3 available values for the prompt are used as the starting string of values to be used in the report. For example, '515' might represent 515000, 515125, 515600, etc. However, I want them to be able to choose more than 1 option. Unfortunately, when the report is executed it only works correctly if one choice is selected. If more than one is picked then it gives the error.

mhmohammed
Active Contributor
0 Likes

Hi Jeff,

Please change that Multi to Mono, and select only one value from LOVs in the prompt screen. And as you said, it works when you select only 1 value, that makes perfect sense. If you select multiple values, it will give you a Multivalue error (or some other error for the same reason), that you can't fit get 2 values in one cell. Make sense?

Thanks,

Mahboob Mohammed

Former Member
0 Likes

Mahboob,

Wouldn't that limit the user to only picking one option then? The goal is to allow multiple selections, and that's why I used the 'Multi' parameter.

Jeff

mhmohammed
Active Contributor
0 Likes

Hi Jeff,

If you want to choose multiple values, then create a Filter object (yellow filter thing) with @prompt in its Where clause, instead of a Dimension (blue diamond) object as you did. Check out this sample image and create that filter.

Definition in Where clause:

@Select(<Foldername\Cost Center Object Name>)     In     @prompt('Enter Cost Center(s):','A',{'515',542','503'},Multi,Constrained,Persistent)

Thanks,
Mahboob Mohammed

Former Member
0 Likes

Thanks, Mahboob. I will try that. I've never created a Universe filter object before so I'll have to research how to do that.

Former Member
0 Likes

Mahboob, I can't seem to figure out where to create such an object in my Universe. When I go to my Universe and select the Insert Condition button the new object takes the place of my existing Prompt object (see images).

BEFORE

AFTER

mhmohammed
Active Contributor
0 Likes

Hi Jeff,

You're on right track, in the Select Cost Centers (filter object in yellow), write the condition I wrote in my earlier response. Its basically a filter where you can say that

Cost Center = '515' (a specific value) or you can use @prompt if you don't want to hard code a value. Make sense?

Check these training videos:

Thanks,

Mahboob Mohammed

Former Member
0 Likes

Thanks, Mahboob. You probably figured out that my @Prompt object wasn't disappearing. My view was just switching to show only Filters when I started creating the object. I completely overlooked that.

Anyway, it looks like your suggestion solved the problem as I don't get the error any more. Am I correct in assuming that I can remove the unneeded @Prompt object?

Jeff

mhmohammed
Active Contributor
0 Likes

Hi Jeff,

Yes, you can remove that object you first had, as you've created a Filter object now. Make sure you didn't use it in any other reports, they'll be affected too.


Thanks,
Mahboob Mohammed

Former Member
0 Likes

Thanks so much! Problem is solved!

mhmohammed
Active Contributor
0 Likes

Glad, I was able to help!

Former Member
0 Likes

I've come up with a follow-up question: does that filter limit the query results to only those values in the field that match the user's input? For example, if they pick 515 and 503 are only records with that value in the specific field returned?

mhmohammed
Active Contributor
0 Likes

Yes, that's correct. It'll will the data only for 515 and 503, apart from all the columns which you've included in the Result Objects panel.

Ex: I create the below query with Result Columns to be pulled in the report and Filter as

Result Objects:

Country, State, City, Population

Filter:

Country in ('USA','Canada')

Then, in the report, we'll see data for the 4 columns we pulled (Country, State, City, Population), but we'll see data for 2 countries only ('USA','Canada'), as we filtered to get the data for those 2.

Make sense?

The difference is that, as you've prompt in the query, every time you refresh a report, it'll ask you to select the values again (unless you specify persistent parameter, in which case it remembers the values selected during last refresh).

Thanks,

Mahboob Mohammed

Former Member
0 Likes

That's what I was afraid and the reason that I tried to get by with just an @Prompt instead of a filter. What's happening is that the query is filtering the data on values that do not exist and returning no data. My goal was for the data selected at the prompt to be used as the beginning characters of a string in the field and not the actual field values themselves. For example:

I'm passing the user selected values of the prompt, such as 515 and 503 into variables that I then want to use as the first 3 characters of a string. That way any values starting with 515 or 503 are selected. However, since I'm filtering just to get the prompt to work correctly as soon as they select a value they've completely blocked any records from being retrieved.

Former Member
0 Likes

I think I've come full circle and am right back at my initial problem. I need to be able to prompt the user for one or more selections from a pre-defined list and then use those values plus a wildcard to determine which records are retrieved. Maybe what I'm trying to do can't be accomplished, though the @Prompt object works as long as they only pick one value. The Parse error occurs as soon as they pick more than one.

amitrathi239
Active Contributor
0 Likes

only solution i am think for your issue is to create one more additional column in your data base table and store first three values.on this new column you can create prompt..

The way you are doing is similar to the "Match Pattern" operator in webi prompt but again this will take only one value at a time...

Former Member
0 Likes

Unfortunately, modifying the source database table isn't an option. I just don't understand why the Multi parameter isn't working. What's the point of it being available for the Universe if you are still limited to selecting only one value? I suppose one option is to just have them manually enter the string(s) at the prompt instead of selecting from a list and then using those as the variables, but that could become cumbersome if, for example, they need to enter 20 different values.

amitrathi239
Active Contributor
0 Likes

do you have values like 515 or 503 in the column..i guess no..you want to compare the first three string and want all the corresponding records.This is feasible with match pattern..

other alternate is to create multiple prompts in webi with Match Pattern operator..

similar to like this..

Keep prompt text different and use optional prompt..

Former Member
0 Likes

My goal is to have the report prompt the user to select the values they wish from a predefined list. This list consists of the first 3 characters that appear in FieldName. Until I know what values the user wishes to base their query on I can't filter anything. The problem is that I can't get BusinessObjects to allow the user to select more than one value in a prompt. It fails whenever they try.

amitrathi239
Active Contributor
0 Likes

Sorry then i am not sure how to do that...

Former Member
0 Likes

Thanks for trying to help. I'm thinking maybe I should create a derived table or something in which I could add that new field for just the first 3 characters of the original field. Then I could just create a prompt in Webi and limit the values to what I want them to select from.

amitrathi239
Active Contributor
0 Likes

yes,you can go with derived table also..It will work hopefully..

Answers (1)

Answers (1)

mhmohammed
Active Contributor
0 Likes

Hi Jeff,


Try removing '515' from the prompt text, try to parse it and see what happens.


Thanks,

Mahboob Mohammed

Former Member
0 Likes

I get the same message but with '542' in the error description. I turned on ODBC tracing to and I see the following as part of the log: