April 3, 201015 yr This may be more of a script question than a value list question, but here goes (see attachment) What I want to happen is for a user to click on the drop-down list, a warning message appears (a custom dialog box fired using a script trigger), then the drop-down list drops down, revealing its values. I got the first part to work but I just can't figure out what script command to use so the list reveals itself automatically after the warning message is dismissed; currently, what I have to do is click the drop-down menu manually (again) to reveal the list. What command should go in the script? TIA for your help! Rich Career_Launcher_040210.pdf
April 3, 201015 yr Hmm. Let me see if I understand. You have a job record, and the field, "jobs__company_name" is formatted to have a value list of company names. By changing this value, you want to warn the user that they are changing a key relationship. Not only that, somehow, choosing a different value will delete the company from the Company Name list and all related data in Websites! Yikes! Many questions and concerns: 1. Please tell me that you are not relating Jobs to Companies by their names. You should be relating Jobs to Companies by CompanyID. 2. Why allow a user to change the Job's related Company? I'd have New Job on the Company form. No selecting a Company on a Job Form. Void the job and start again. However, if you want to allow the Job::CompanyID to be changed, how about limiting it to an Admin? Give them a button that allows them to select from a list of Companies (IDs) (see popup selector list threads and demos). I'm curious as to why changing a Job's CompanyID deletes "the Company from the Company Name list and any related data in Websites."
April 3, 201015 yr Author Good question, "b"--let me get back to you about this after I speak with the client. (Don't you hate Non-Disclosure Agreements? :S) Okay, the part about "...and any related data in Websites" isn't true--there was a relationship to Websites that no longer exists, so that text needed to be deleted from the warning message. To answer your question, jobs__company_name isn't related to another table and draws its values from itself (all values), so if a user accidentally changes its value to a different company name then the rest of that record's information won't jive with it anymore, hence the warning message. Edited April 3, 201015 yr by Guest
April 4, 201015 yr "To answer your question, jobs__company_name isn't related to another table and draws its values from itself (all values), so if a user accidentally changes its value to a different company name then the rest of that record's information won't jive with it anymore, hence the warning message." 1. I'd have a table for Companies, and a value list derived from that table CompanyID and Name (show second value only). 2. That is why I wouldn't allow a Job's company to be changed.
April 4, 201015 yr Author Interesting suggestion, but I still can't see how creating the company name in its own table doesn't prevent a user from selecting another company name from the value list. *blush* My ignorance is showing. Edited April 4, 201015 yr by Guest
April 5, 201015 yr Back to my second post: I would not let the user select a Company on the Job Form. I would have a New Job button on a Company Form. My New Job script would set the foreign CompanyID key in the Job record.
Create an account or sign in to comment