Oh, I see.  The type doesn’t appear in the employee table so you want to pass in a constant value to relate against.

 

There’s not a way to do this out of the box with Reactor.  It sounds to me like you might need to code something.

 

Doug

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bowden, Beth (NIH/NIEHS) [E]
Sent: Wednesday, March 22, 2006 10:00 AM
To: [email protected]
Subject: RE: [Reactor For CF] Using a literal in relate

 

A literal or hard-coded value or constant.  Say, I use the LOOKUP table to populate dropdown lists and validate data.  The LOOKUP table has 3 columns:  type, code and description. Typical entries might be:

 

Type         code           description

JOB          T                  Technician

JOB          M                 Manager

JOB          D                 Driver

PAY          S                 Salaried

PAY          H                 Hourly

 

I have an EMPLOYEE table with these columns: id, job_code, pay_code, … etc.  Typical entries might be:

 

Id                      job_code    pay_code

111111111        T                 S

222222222        T                 S

333333333        T                 S

444444444        T                 S

 

 

What I’d like to do is relate the job_code in the employee table to the lookup table using something like this:

 

<object name="EMPLOYEE">

    <hasOne name="LOOKUP">

          <relate from="job_code"    to="code" />

          <relate constant="JOB"     to="type" />

    </hasOne>

</object>

 

I wanted to check for a way in baseline Reactor to do this before I start coding something.

 

Thanks

 


From: Doug Hughes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 22, 2006 9:45 AM
To: [email protected]
Subject: RE: [Reactor For CF] Using a literal in relate

 

No, I don’t think so.  I’m not familiar with the term literal.  Can you elaborate a bit?

 

Doug

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bowden, Beth (NIH/NIEHS) [E]
Sent: Wednesday, March 22, 2006 9:44 AM
To: [email protected]
Subject: [Reactor For CF] Using a literal in relate

 

Is there a way to use a literal when relating two tables? For example.

 

  <relate from="person_code"   to="code" />

  <relate constant="PERSON"    to="code_type" />

 

TIA.

 

Beth

-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/ -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/ -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/ -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

Reply via email to