The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Question About showing Approver Name in portal for flow

JackieZhang
Tera Contributor

I know that displaying the approver name for flow on the portal is a known issue. ServiceNow seems to be to fix him in it Zurich version. I have found the sys properties com.glide.Hab.fflow_degine.stage_display. show_approvers in the widget Request Item Workflow Stages, after I set it to true but it does not work. I tried to fix this feature, but I found that the flow context is not associated with the approval table. Does anyone have any good suggestions?

2 REPLIES 2

Bhuvan
Kilo Patron

@JackieZhang 

 

It can be done using workflow,

 

https://noderegister.service-now.com/kb?id=kb_article_view&sysparm_article=KB1121753

 

This was one of the Flow Designer limitations and an idea was created in the Idea Portal to make it available in Flow. If you have any reference knowledge article or ServiceNow documentation that this feature is available in Zurich release using flow designer, please share.

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

I knew, but you knew, the Zurich will quit the workflow.  I noticed ServiceNow did some change for some widget. 

 

JackieZhang_0-1756433474858.png

if (renderer == 'Legacy' || renderer == "SCReqItemRenderer" || renderer == "FlowDesigner") {
                if (ref.getProviderType() == 'PFStagesProvider' || renderer == "FlowDesigner") {
                    choiceList = ref.getStages();
                }
                else {
                        var clGenerator = new GlideChoiceListGenerator('sc_req_item', 'stage');
                        clGenerator.none = false;
                        choiceList = clGenerator.get();
                        api.internationalizeChoices(choiceList);
                        var wfw;
                        if (sc_req_item.stage.hasAttribute('icons') && typeof (this[sc_req_item.stage.getAttribute('icons')]) == "function")
                                wfw = new this[sc_req_item.stage.getAttribute('icons')]('sc_req_item.stage');
                        else
                                wfw = new WorkflowIcons('sc_req_item.stage');
                        choiceList = wfw.process(choiceList);
                       
                }
        var list = [];
        if (!JSUtil.nil(choiceList)) {
            var showApprovers = false;
            if (renderer == "FlowDesigner")
                showApprovers = data.properties.flowdesigner_show_approvers == "true";
           
            for (var i = 0; i < choiceList.size(); i++) {
                var choice = choiceList.get(i);
                if (!JSUtil.nil(choice.getValue())) {
                       if (ref.getProviderType() == 'PFStagesProvider' && (choice.getParameter('visible') == false || JSUtil.nil(choice.getParameter('state'))))
                        continue;
                    var temp = {};
                    temp.label = choice.getLabel();
                    temp.title = choice.getParameter('title') || choice.getLabel();
                                        temp.state = choice.getParameter('state');
                                        temp.name = choice.getParameter('name');
                    if (ref.getProviderType() == 'PFStagesProvider')
                                                temp.displayValue = temp.title + " (" + temp.state + ")";
                                        else
                                                temp.displayValue = temp.title + " (" + temp.label + ")";
                    temp.value = choice.getValue();
                    temp.id = choice.getId();
                    temp.selected = choice.getSelected();

                    var imgsrc=choice.image.split(' ');
                    imgsrc=imgsrc.length ? imgsrc[0] : imgsrc;
                    if (!imgsrc)
                        imgsrc=temp.selected ? 'icon-check-circle' : 'icon-empty-circle';
                   
                    imgsrc += high_contrast;
                    temp.image = imgsrc + '.png';

                    if (showApprovers) {
                        var approvers = choice.getParameter("approvers");
                        var approverArr = [];
                        for (var j = 0; j < approvers.size(); j++) {
                            var approver = JSON.parse(JSON.stringify(approvers.get(j)));
                            approverArr.push(approver.label);
                        }
                        temp.approvers = approverArr;
                    }

                    list.push(temp);
                }