Taxonomy fields in autocomplete

Home Forums Autocomplete Taxonomy fields in autocomplete

Viewing 4 reply threads
  • Author
    Posts
    • #19423
      Aglika Tilev
      Participant

        Hi Alexander,

        are there any restrictions on taxonomy fields using autocomplete?
        Many thanks in advance
        Aglika

      • #19442
        Alexander Bautz
        Keymaster

          Hi,
          I’m not 100% sure I understand your question, but the AC-plugin can only be used on single line of text columns.

          Do you maybe mean to set a taxonomy field in the “setFields” parameter?

          Alexander

        • #19464
          Aglika Tilev
          Participant

            Hi,

            I like to use a taxonomy field in the “showField” and “setFields”.
            Regards
            Aglika

          • #19513
            Alexander Bautz
            Keymaster

              Sorry for the delay – here is a snippet you can use. Add this to the Custom JS:

              function parseSingleChoiceManagedMetadata(val){
                  return '"'+String(val).split(";#")[1]+'"';
              }

              Then specify the function name in the “parseFunction” parameter like this:

              ...
              ...
              "setFields":[{
                  "fromFIN":["ManagedMetadata"],
                  "joinBy":"",
                  "toFIN":"ManagedMetadata",
                  "parseFunction":"parseSingleChoiceManagedMetadata",
                  "skipIfEmpty":false
              }]

              Alexander

            • #19585
              Aglika Tilev
              Participant

                Many thanks!

                Aglika

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