Skip to main content
Inspiring
August 30, 2007
Question

JOIN TO FIELDS TO CREATE A NEW FIELD NAME

  • August 30, 2007
  • 1 reply
  • 269 views
Dreamweaver MX / MySQL / PHP


I'm currently working on a DYNAMIC DROPDOWN SEARCH for a recruitment company Where the visitor selects either "ANNUAL" or "HOURLY" in the first menu and the second menu changes to either £10,000 0r £4.50 for the wages section.

I can make the second menu change dynamically after the first menu is defined, but the ID given to the second menu (by me) means that it only ever searches the Hourly field or the Annual field but not both. Let me explain...

I have a Jobs table and a salary table. Two fields in the Jobs table are HOUR and ANNUAL and these are inserted using a menu list drawn from a salary table. Its very easy to insert the data into the Jobs table - click on the HOURLY menu, select the figure and insert it into the HOUR field and then complete the process by inserting the relevant figure into the ANNUAL field. The problem lies in a customer search on the Public side,

I want the visitor to choose either HOUR or ANNUAL when searching. I can do this using a dynamic dropdown menu (an MX Extension) THE FIRST MENU is selected and then the second menu changes to either the Annual or Hourly figures. BUT!!! I can only give one ID to the second menu which is.....

S_jobHourly or S_jobAnnually

So it works to a degree - if I make the second menu's ID value S_jobHourly it will return all the hourly figures chosen by the user. But if the user clicks ANNUALLY then it returns nothing because there are no hourly rates = £10,000.

Is there a way to perhaps join these two fields in a recordset and then give that join a new name? So I could say name the result S_jobSum and that means that the second dropdown menu (given the value S_jobSum) would search both £10,000 and £4.50 and then return the Job which matches?

Hope this is clear.

I'm really close on this and any help on this would be absolutely fantastic.

Many thanks
Hurst
This topic has been closed for replies.

1 reply

Inspiring
August 30, 2007
Hi there

I'm wondering if it would be easier to dynamically change the Label Value of the second drop down menu.... is that possible?

i.e "If first menu content = "Hourly Wage" then second label id = S_JobHourly but if content is pulled from "Annual Wage" then label iD = S_jobAnnually. A dynamic id label for the second dropdown menu would solve this perfectly.

Any Ideas?

Thanks
Hurst Vanrooj