Home › Forums › Autocomplete › AC not saving value in latest release
- This topic has 11 replies, 2 voices, and was last updated 8 years, 4 months ago by Alexander Bautz.
-
AuthorPosts
-
-
July 28, 2016 at 18:27 #12556
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:
-
July 28, 2016 at 18:47 #12560
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
-
July 28, 2016 at 18:55 #12562
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.
-
-
July 28, 2016 at 19:38 #12564
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
-
July 28, 2016 at 19:48 #12566
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.
-
-
July 28, 2016 at 19:56 #12568
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-
July 29, 2016 at 00:12 #12570
Tested and the top one is not populating. This is for our SharePoint 2010 farm.
Attachments:
-
-
July 29, 2016 at 17:55 #12584
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
-
August 1, 2016 at 13:57 #12619
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 8 years, 4 months ago by Alexander Bautz. Reason: Changed URL so its not revealed to all users
-
August 2, 2016 at 19:12 #12646
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-
August 2, 2016 at 20:24 #12650
Updating to v1.4.6 has fixed the issue. Thank you again for your generous time and patience!
-
-
August 2, 2016 at 22:22 #12652
Thank you for the feedback – I’m glad it worked out.
Best regards,
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.