Jump to content

Hello, I have two synonyms: Entity and Employee Entity has a...


Robert Kottelenberg

Recommended Posts

There was a problem with this editor. I was trying to put < Not Assigned > (without spaces by the brackets) in the string and the editor got confused and removed it (i think it thought that was supposed to be an html element).

Turns out the < > were also the problem with the define. Removing those made it work. Not sure why the brackets would matter for WebFOCUS

Link to comment
Share on other sites

Brackets are HTML element and have special meaning in WebFCOUS.

Use the code tag when posting code the icon that looks like the following:

</>

or type (without spaces): [ code ] your code here [ /code]

Below does work

DEFINE FILE CAR

NCOUNTRY /A10 MISSING ON = IF COUNTRY EQ 'FRANCE' THEN MISSING ELSE COUNTRY;

NTEXT /A20 MISSING ON = IF NCOUNTRY EQ MISSING THEN '< Not Assigned >' ELSE NCOUNTRY;

END

TABLE FILE CAR

PRINT NCOUNTRY

NTEXT

BY COUNTRY

END

Link to comment
Share on other sites

Hello,

I have two synonyms: Entity and Employee

Entity has a Field EmployeeID that is NullableMISSING.

Employee has a field Name.

I have created another synonym that joins Entity to Employee using a left outer join, so I can still get all Entities, regardless if they have an employee assigned.

I would like to create a DEFINE in the new synonym that will return the text when the Entity.EmployeeID is Missing, otherwise EMPLOYEE.Name.

I have tried this:

DEFINE EMPLOYEENAME/A41V MISSING ON ALL=IF EMPLOYEEID EQ MISSING THEN ELSE EMPLOYEE.NAME;

When I use this in a report, I get blank values when the Entity.EmployeeID is MISSING

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...