AC not saving value in latest release

Forums Autocomplete AC not saving value in latest release

Viewing 7 reply threads
  • Author
    Posts
    • #12556
      avala
      Participant

      AC field is looking at itself and validating correctly in New and Edit form, but on save, the value is not saved the list. When reopening the edit form, the field is blank. Can you replicate this behavior? Not seeing this behavior with previous iterations.

      
      
      spjs.ac.textField({
      "applyTo":"Location",
      "helpText":"Enter Location...",
      "listGuid":"TFMM",
      "listBaseUrl":"/URL",
      "showField":"Location",
      "enforceUniqueValues":true, // New in v1.33
      "rowLimit":15,
      "listOptionsOnFocus":true,
      "reValidateOnLoad":false,
      "allowAddNew":true, // New in v1.4
      "isLookupInSelf":true, // New in v1.4
      "setFields":[
      {
      "fromFIN":"",
      "toFIN":"",
      "parseFunction":"",
      "skipIfEmpty":false
      },
      {
      "fromFIN":"",
      "toFIN":"",
      "parseFunction":"",
      "skipIfEmpty":false
      }
      ]
      });
      Attachments:
    • #12560
      Alexander Bautz
      Keymaster

      Hi,
      Could you check to see if the value is present in DispForm when you have added it in NewForm?

      Also, please check the developer console (hit F12 > Console) when opening the list item in EditForm to see if there are any errors there.

      Alexander

      • #12562
        avala
        Participant

        There is no value in the Disp form or in the list view after saving. There is also no console error on editForm load, updating the AC field, or on save.

        The AC field is able to pull in values from the correct list if I add them through datasheet view. Seems like the commit function isn’t working.

    • #12564
      Alexander Bautz
      Keymaster

      Hi,
      I’m a bit confused by “The AC field is able to pull in values from the correct list if I add them through datasheet view”.

      The SPJS autocomplete solution will only work in a text field and not in a lookup field – what exactly do you mean here?

      Alexander

      • #12566
        avala
        Participant

        Sorry for any confusion.

        The AC is on a single line text field. Since the solution was not committing the value entered into the form, I went to the list view and entered the value manually in the datasheet view. After I had done this, I opened up a new edit form and it displayed that value as a selection. Again, the AC field is looking at itself in the same list. I hope this clarifies what I am seeing.

    • #12568
      Alexander Bautz
      Keymaster

      Thanks for the clarification. Could you try adding “?acDebug=1” to the URL like this:

      ../Lists/DFFS_TestList/NewForm.aspx?acDebug=1

      You will now see both the hidden input field and the autocomplete input. Try filling the bottom one and see if the top one gets populated.

      Please note that this requires the developer console to be open (hit F12 > Console).

      PS: I have tested it here on office 365 and it appears to work as expected here.

      Best regards,
      Alexander

      • #12570
        avala
        Participant

        Tested and the top one is not populating. This is for our SharePoint 2010 farm.

    • #12584
      Alexander Bautz
      Keymaster

      I have done a few tests, but cannot recreate the issue. Could you try adding the autocomplete in a new tab, and have it not side-by-side with another column.

      Any difference?

      Do you have any DFFS rules on this column?

      Also, I noticed that your “setFields” array has invalid entries (empty fromFIN and toFIN). Change it from this:

      "setFields":[
      {
      "fromFIN":"",
      "toFIN":"",
      "parseFunction":"",
      "skipIfEmpty":false
      },
      {
      "fromFIN":"",
      "toFIN":"",
      "parseFunction":"",
      "skipIfEmpty":false
      }
      ]

      to this:

      "setFields":[]

      Alexander

    • #12619
      avala
      Participant

      No difference. There are no rules on or referencing this column. Same behavior on a tab with just the Location field. I’ve updated the code to:

      
      
      spjs.ac.textField({
      "applyTo":"Location",
      "helpText":"Enter Location...",
      "listGuid":"TFMM",
      "listBaseUrl":"https://contoso.com/sites/bw20002853/deseng",
      "showField":"Location",
      "enforceUniqueValues":true, // New in v1.33
      "rowLimit":15,
      "listOptionsOnFocus":true,
      "reValidateOnLoad":false,
      "allowAddNew":true, // New in v1.4
      "isLookupInSelf":true, // New in v1.4
      "setFields":[]
      });
      • This reply was modified 4 years, 1 month ago by Alexander Bautz. Reason: Changed URL so its not revealed to all users
    • #12646
      Alexander Bautz
      Keymaster

      I’m not sure why this happens, but could you try the latest version (v1.4.6) to see if it is something funny with the version you have tried?

      PS: My download site is down, but you can find the files in the DFFS “IncrementalReleases” folder linked here: https://spjsblog.com/2016/08/02/spjsfiles-where-all-the-solution-files-are-located-is-unavailable/

      Best regards,
      Alexander

      • #12650
        avala
        Participant

        Updating to v1.4.6 has fixed the issue. Thank you again for your generous time and patience!

    • #12652
      Alexander Bautz
      Keymaster

      Thank you for the feedback – I’m glad it worked out.

      Best regards,
      Alexander

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