1 Reply Latest reply on Feb 26, 2012 3:50 PM by Sprucegum

    Prompting User-Input for One Time Input Fields

    kingsley47

      Title

      Prompting User-Input for One Time Input Fields

      Post

      Basically I need to make a prompt to input weight data associated with specific part numbers, if the data has not already been put into our database. Here is the way I have been trying to go about it

      I need the weight data to pop-up in a database called heat treatment.

      I am storing the wieght data in a database called Part Number Summary. In the part number summary database, each record's unique identifier is the part number and this is what I plan on using as the look-up reference for the field PN_Weight (in the heat treatment database).

      In the heat treatment database, a unique identifier (the work order number) is typed in and this causes other fields to be auto-populated. One of the fields that are populated contains the part number and this in turn prompts more fields to be auto-populated with information that is not specific to the work order but now to the part number. The issue I have is that the users that use the heat treatment database do not go into the Part Number Summary database but they are the people that need to input the weight. Unfortunately they are not doing this so I want to make a prompt that forces them to do so. I have tried writing a script that looks at the P/N_Weight field, in the heat treatment database, (which is a look-up field from the Part Number Summary database) and if the P/N_Weight field is empty than a rpompt comes up to input the weight into the required fields. I would like the next step in the script to then open up the P/N Summary and bring them to the record that is specific to that part number and then to the P/N_Weight field in the P/N Summary Database so that they can put in the weight. So far none of my scripts have worked. Could someone help me with this? I think it is fairly common to make prompt screens that force users to input semi-global data into a database. I think I am just going about it the incorrect way.

        • 1. Re: Prompting User-Input for One Time Input Fields
          Sprucegum

          If I understand you correctly, different users are responsible for entering different information specific to each Part Number.  Using conventional Field Validation would present ALL Users with a warning message when field values are missing, so you want to present specific Users with specific warnings, correct?

          If so, have you defined different Privilege Sets for different User Accounts to limit access to specific fields (or have you created some other way to distinguish one User Group from another)?

          A script can determine on the basis of Get(PrivilegeSetName) which fields in the Part Number table are still empty and require data from the current Users Privilege Set.  As in:

              If [Get(PrivilegeSetName)=”[HTUsers]”]   /*Heat Treatment File Users*/

                    If [IsEmpty(Weight)]

                            Show Custom Dialog (“Please enter the Weight of Part# “ & Part#ID)

                            Go To Field (PartNumber::Wieght)

                     End If

              End If

          You can trigger this script from the Layout using the <On Record Commit> trigger.

                Go to Part Number Data Entry layout In Layout Mode

                Select Layout Setup… from the Layout menu

                Select the Script Triggers tab

                Select the On Record Commit trigger and specify the script