parse failed invalid definition unv0023

Hi Guys,

I have created an object in my Universe. The object is not present at database level only in the Universe as I want to use it as a prompt and populate it with a LOV.

However I want to ensure that Designer can see the object first - so:

In both the ‘select’ and ‘where’ panes, (not together but seperately to try and resolve), I have clicked the >> button to define by going to the ‘Classes and Objects’ pane and selecting the object I have created.

I have also tried to assign the object to a table via the tables button for the sake of using it in a join.

Yet each time I get : parse failed invalid definition unv0023

Please advise?

Thanks in advance.
Steve
:hb:


SFA :uk: (BOB member since 2009-10-13)

Please can you post the code?

Thanks,
Mark

I’ve been trying to parse:

@Select(Sys Compgrp\IsJapanese)

Just to see that Designer recognises the object.


SFA :uk: (BOB member since 2009-10-13)

SFA,

Does this object ‘Sys Compgrp\IsJapanese’ parse?

What’s more important: does it work in a report?

Hope this helps,
Johan


JdVries :netherlands: (BOB member since 2006-02-06)

No it does not parse.

I have not tried as I will need to assign it a LOV from a prompt first and I want to write it so that it parses to then create the prompt.

I have created it all together but still get the parse failed invalid definition unv0023 error.

So thought I would start from bottom up to get it working.

Thanks


SFA :uk: (BOB member since 2009-10-13)

SFA,

I don’t really understand what you are trying to achieve. :crazy_face:

You have created an object that is not based on a column in a table.

and

IMO a LOV is based on a column in a table (or a derived table) and not on a prompt.
And what if you assign this LOV to the ‘object’? :crazy_face:

Maybe is top down a better approach :rotf:

My assumption: you want an object that returns values that are not in the database.
If that is the matter, maybe you should:

  • Create a derived table with the values you want displayed in the LOV?
  • Create the object based on the derived table.
  • Create the LOV based on the derived table.

Hope this helps,
Johan


JdVries :netherlands: (BOB member since 2006-02-06)

Why do IsJapanese not parse?

What is the SQL that it uses?

Johan,

That sounds like a plan. However I have written the below as the SQL expression for the derived table I have named Is_Japanese

SELECT
(
@Prompt('Japanese Clients Only Y/N?: ',‘A’,{‘N’,‘Y’},mono,constrained,{‘N’}) As ‘Response’
)
From Table

But when I check the syntax I get:

“Each calculated column must have an explicit name.”

And I don’t understand why as I’ve used As ‘Response’

If there is an easier way to create the SQL by not using the prompt I’d love to know. All I need is:

one derived table, with one object that holds two values ‘Y’ and ‘N’

Maybe I’m thinking about it too much now.

?


SFA :uk: (BOB member since 2009-10-13)

SFA,

Looking at your post I think this isn’t the correct way either…a derived table is just too much for this problem.

You can create an object like:

@Prompt('Japanese Clients Only Y/N?: ','A',{'N','Y'},mono,constrained,,{'N'})

This will not parse (because it is not associated with a table), but that is no problem.
It will work in a report when you combine it with an object that is associated with a table.

select
 @Prompt('Japanese Clients Only Y/N?: ','A',{'N','Y'},mono,constrained,,{'N'}),
 table.column
from table

The LOV exists in the 2 possible values: Y, N.

You might need a predefined condition like:

table.nationality = case @Prompt('Japanese Clients Only Y/N?: ','A',{'N','Y'},mono,constrained,,{'N'}) when 'Y' then 'JAP' else table.nationality end

Hope this helps,
Johan


JdVries :netherlands: (BOB member since 2006-02-06)