dynamically add new dropdown values

  • 8 December 2015
  • 2 replies
  • 17 views

Badge +1

We have a scenario where we want to dynamically add new values to a dropdown field (single choice). Is this even possible? We've been looking at the UpdateList method in the Call Web Services action, but have not found information on a similar process anywhere.


2 replies

Badge +17

Andrew,

Are you looking to do this in a form dynamically or a workflow?  In a workflow it is possible, but in a form, that's a different story.  If you want to provide a drop down from a list, then offer an additional field, you could do that, capture the text and add that to the list after submission as an option.

Badge +1

Thanks for the reply! We actually just figured out the proper syntax. It turns out we were using the List Name property and not the List ID (GUID) which was giving us the problem. I'll post the code below. Essentially, when another one of our workflows creates a new folder in a library, we want this workflow to grab the folder names, stick them in a Multiline variable and update the Dropdown field with all of the Folder names as dropdown values. We then use this dropdown field value to move documents back and forth between folders for ad hoc permissions.

      <m:listName>{Common:ListID}</m:listName>

      <m:listProperties>

      </m:listProperties>

      <m:newFields>

      </m:newFields>

      <m:updateFields>

<Fields xmlns="">

          <Method ID="3">

            <Field Name="Folder" DisplayName="Folder" FromBaseType="TRUE"  Type="Choice">

              <CHOICES>

                <CHOICE>SP</CHOICE>

                <CHOICE>is</CHOICE>

                <CHOICE>kinda</CHOICE>

                <CHOICE>cool</CHOICE>

              </CHOICES>

            </Field>

          </Method>

        </Fields>

        </m:updateFields>

Reply