Add a User Field value to an article


  • Elliott B.

    Hi Bprazner,

    While there are no tools built into the Help Center user interface to accomplish this, it could be done with some clever usage of our API.

    For example:

    1. Get the value of the custom user field in question for the current user via the Show User endpoint
    2. Get the content of the requested article via the Show Article endpoint
    3. Use a function such as gsub to find all instances of a pre-defined element in your article HTML and replace it with a new element containing the value of the custom field.
    4. Build the page containing the article text with formatting relative to the current user.

    That's just my take on this particular issue. Our community members find all sorts of creative ways to use our API though, so they may suggest a different approach, or otherwise fill in the details of my basic outline!


Please sign in to leave a comment.

Powered by Zendesk