Home › Forums › Classic DFFS › Updating Multichoice dropdown field with new value
- This topic has 11 replies, 2 voices, and was last updated 5 years, 8 months ago by Alexander Bautz.
-
AuthorPosts
-
-
April 24, 2019 at 17:10 #24984
I have a multichoice field dropdown that allows fill in choices.
I want to update the field by Java. The update writes to the multichoice field sucessfully if the value exists in dropdown. If the value does not exist in dropdown it succesfully adds text to the specify own value box but does not update the check box for ‘Specify your own value’. See screen shot attached.
On save the value in the field remains on old value rather than updated with new value.
However If I manually check the box for ‘Specify your own value’ it saves correctly.
How can I set the check box to for ‘Specify your own value’by java ?
Attachments:
-
April 24, 2019 at 19:45 #25001
Hi,
Thanks for pointing this out – it is a bug in the function that causes this radio button to not set properly. I’m not sure if it actually worked in earlier versions of SharePoint, but I will change the function and release a new version of DFFS during next weekend.Sorry for the inconvenience.
Alexander
-
April 26, 2019 at 09:03 #25025
Thank You Alexander.
-
April 28, 2019 at 17:35 #25060
Hi,
I’m unfortunately not able to publish the new version of DFFS this weekend after all, but I have attached the updated version of SPJS-utility.js if you like to update that in your current release. Just unzip and replace the file you have in /SPJS/DFFS/plugins.Alexander
-
April 29, 2019 at 08:59 #25069
Thank you. I will give that a go.
Alternatively is there a way to check and update the values in the multichoice dropdown field before you update it ?. This might get round the radio button to not set properly.
-
April 29, 2019 at 09:12 #25071
I am afraid the new code is not working the other way now i.e if the value exists in the dropdown it does not toggle the radio button. If it does not exist in values then it will toggle to the check box for ‘Specify your own value’. I have reverted the utility back to the original.
Is there a way to check and update the values in the multichoice dropdown field before you update it ?. This might get round the radio button to not set properly.
-
April 29, 2019 at 16:59 #25075
I have made one change to ensure it checks the correct radio button when setting a value that exists in the dropdown. I appreciate your feedback if you are able to test it.
Best regards,
Alexander
-
-
April 29, 2019 at 10:25 #25073
Sorry, I’ll look at it and get back to you.
Alexander
-
April 30, 2019 at 09:07 #25108
I am afraid the code did not work. Error attached.
I have amanged to get a workaround by adding an additional people picker field and moving away from dropwdown. Thank you for your help.
Attachments:
-
April 30, 2019 at 10:24 #25111
I’m sorry for the inconvenience – the error is related to the change of the minification method I used. I normally use Dean Edvards Packer, but this page is down and I changed to another minification method that obviously did not work properly.
If you want to have another go I have attached an unminified version here.
Alexander
Attachments:
-
April 30, 2019 at 11:23 #25114
Great that works and toggles correctlt. Thank you again.
-
April 30, 2019 at 15:18 #25121
Thanks for helping me sort out the bugs!
Best regards,
Alexander
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.