Taxonomy fields in autocomplete

Forums Autocomplete Taxonomy fields in autocomplete

This topic contains 4 replies, has 2 voices, and was last updated by  Aglika Tilev 3 months, 2 weeks ago.

  • 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

You must be logged in to reply to this topic.