Query JSLink / display calculated field image - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Query JSLink / display calculated field image

Last post 07-11-2017 07:59 AM by sbryf. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 07-11-2017 07:59 AM

    • sbryf
    • Not Ranked
    • Joined on 07-11-2017
    • Posts 1

    Query JSLink / display calculated field image

    Hi there, hope all is well. I have a sharepoint list using the calculated field to display an image based on an another field's value. Like "risk identified" in the status column would display a yellow icon in view (html in the field). I did this using JSLink as Microsoft does not support the number workaround anymore. The JS is quite simple really (renders the HTML):

    (function () {
     var overrideCtx = {};
     overrideCtx.Templates = {};
     overrideCtx.Templates.Fields = {
      'Engaged_IMG': {'View': renderField}
     };
     SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
    })();

    function renderField(ctx) {
     return STSHtmlDecode(ctx.CurrentItem[ctx.CurrentFieldSchema.Name]);
    }

    Now, how do I do the same in my infopath form? I am using infopath to design the new / display / edit form but can't get the HTML in the calculated field to render. It just displays as text <img .... The JSLink option in the webpart seems not to exist in this case.

    Thank you,

    Robert 

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.