Auto Fill Fields if the user selects a name that already exists

Home Forums Classic DFFS Auto Fill Fields if the user selects a name that already exists

Viewing 6 reply threads
  • Author
    Posts
    • #33175
      Paul Heffner
      Participant

        I hope I can explain properly. We have a list that we keep current and historical info in. If a user wants to update an item, I have it already set to search for the current names so they can select it. Now, once they select a name, I want the other fields to fill in with the list entry listed as the active entry.

        I thought about cascading drop downs but is there a better way?

      • #33179
        Alexander Bautz
        Keymaster

          Hi,
          It could be done with some custom code, but to write an example I need the internal name of the field that mark an item as active, the “name” field and the fields to update (internal name and field type).

          Alexander

        • #33191
          Paul Heffner
          Participant

            VQName – This is the name of the field the user will search up
            Current_x0020_Flag – Boolean to ID current record
            Attribute1 – First field that I would like to autopopulate.

            the rest of the fields are Attribute2 through Attribute12

            There are also StartDate and EndDate fields but I think the Current Flag is what I want to look at.

          • #33193
            Paul Heffner
            Participant

              Sorry for the double post but I have some Custom JS so the user can start typing the VQName and it will return a list matching what they type.

            • #33217
              Alexander Bautz
              Keymaster

                Sorry for the late reply – can you show me the code you use to select the VQName? – also, is it a single ling of text field or a people picker?

                Please also tell what kind of field types Attribute1-12 are because the values might need to be cleaned up before writing to the form when using a query to get the old item.

                Alexander

              • #33257
                Paul Heffner
                Participant
                  
                  
                  spjs.ac.textField({
                  
                  "applyTo": "Title",
                  
                  "helpText": "",
                  
                  "loadText": "",
                  
                  "listGuid": "{c7d70902-b17b-4cd1-bd33-6fd55219de3e}",
                  
                  "listBaseUrl": "/sites/CCSSMandR/MIS",
                  
                  "showField": "Title",
                  
                  "searchFields": [],
                  
                  "filterCAML": "",
                  
                  "useREST": false,
                  
                  "preloadData":false,
                  
                  "filterREST": "",
                  
                  "optionDetailFields": [],
                  
                  "optionDetailPrefix": [],
                  
                  "enforceUniqueValues": false,
                  
                  "rowLimit": 15,
                  
                  "listOptionsOnFocus": false,
                  
                  "minLengthBeforeSearch": 4,
                  
                  "reValidateOnLoad": false,
                  
                  "allowAddNew": true,
                  
                  "addToFolder": null,
                  
                  "isLookupInSelf": true,
                  
                  "addNewAdditionalFields": [],
                  
                  "multiselect": false,
                  
                  "multiselectSeparator": "; ",
                  
                  "orderBy": [],
                  
                  "clearSetFieldsOnInvalidSelection": false,
                  
                  "setFields": [],
                  
                  "debug": false
                  
                  });

                  All fields are single line text.

                • #33262
                  Paul Heffner
                  Participant

                    Worked like a charm. Sorry for completley glossing over that field.

                Viewing 6 reply threads
                • You must be logged in to reply to this topic.