Announcement

Collapse
No announcement yet.

How do I Auto-Populate a Field after a Look-up

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I Auto-Populate a Field after a Look-up

    I have a form application (editable grid view) that maintains a historical listing of every position that person holds or has ever held. Because there are many possible position titles, I have the office_list_key set up as a Number Auto_Complete data type. In the Lookup Settings section for that field, in addition to the SQL Select Statement, I have also created a link to an office_list_display form application using the “Create Link” button found in that section. This form is simply a listing of all office titles, using the Radio data type option.

    My problem is that, while the office_list_key is being successfully captured and transferred to the originating form (I confirmed this by using the sc_error_message macro and echo functions), I cannot figure out how to set everything up so that, after a person clicks on a radio button, then clicks on the ‘Done’ button to return to the first form, that the field on the first form becomes automatically populated. I have tried creating a global variable and have the Insert option set as a Defined Value with the global variable being listed as the value to insert. I thought perhaps that ScriptCase would treat it like an auto-increment number and simply populate that field as the record is inserted. This, however, does not happen and an error is produced when tried (this is a required field). I have also tried coding something into the onBeforeInsert Event option, but with no success. No matter what I do, I have not been able to get that value to be placed into the office key field on that form.

    What am I doing wrong?

    As I am a newbie to ScriptCase (neck deep into it for 2 months now), I would appreciate any help that can be offered!
Working...
X