Updating Multichoice dropdown field with new value

Forums Dynamic Forms for SharePoint Updating Multichoice dropdown field with new value

This topic contains 11 replies, has 2 voices, and was last updated by  Alexander Bautz 3 months, 2 weeks ago.

  • Author
    Posts
  • #24984

    Gulbinder Sandhu
    Participant

    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 ?

  • #25001

    Alexander Bautz
    Keymaster

    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

  • #25025

    Gulbinder Sandhu
    Participant

    Thank You Alexander.

  • #25060

    Alexander Bautz
    Keymaster

    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

  • #25069

    Gulbinder Sandhu
    Participant

    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.

  • #25071

    Gulbinder Sandhu
    Participant

    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.

    • #25075

      Alexander Bautz
      Keymaster

      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

  • #25073

    Alexander Bautz
    Keymaster

    Sorry, I’ll look at it and get back to you.

    Alexander

  • #25108

    Gulbinder Sandhu
    Participant

    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:
  • #25111

    Alexander Bautz
    Keymaster

    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

  • #25114

    Gulbinder Sandhu
    Participant

    Great that works and toggles correctlt. Thank you again.

    • #25121

      Alexander Bautz
      Keymaster

      Thanks for helping me sort out the bugs!

      Best regards,
      Alexander

You must be logged in to reply to this topic.