Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Need a tweak: script trigger and drop-down list


This topic is 5346 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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."

Posted (edited)

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 by Guest
Posted

"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.

Posted (edited)

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 by Guest
Posted

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.

This topic is 5346 days old. Please don't post here. Open a new topic instead.

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...

Important Information

By using this site, you agree to our Terms of Use.