Posts

Power Apps - Trigger Power Automate Flow On Approval Reassign

Image
 Do you ever get this requirement where your client asks to perform some operation when approval gets reassigned? Today, I'm going to demonstrate how we can trigger the power automate flow when somebody reassigns the approver. To start with, you need to make a Power Automate Flow. Step 1 :  msdyn_flow_approvalrequestidx_reassignedfromid ne '<none>' Incase of reasssign, reassignedfromid contains guid. Step 2 :  triggerOutputs()?['body/msdyn_flow_approvalrequestid'] Pass the Approval Request Id from the trigger outputs. Step 3 :  triggerOutputs()?['body/msdyn_flow_approvalrequestidx_approvalid'] Pass the Approval Id from trigger outputs. Step 4 :  triggerOutputs()?['body/msdyn_flow_approvalrequestidx_approvalid'] I've used this action to get data from item link/ Item link description. This is very helpful when you want to make changes to a specific record, you can put the GUID of that record in the approval Flow's item link description an...

Power Pages - Make Multi-Select Fields Read only on Power Portals

Image
Hello and welcome to another Javascript post on Power Pages. You can easily find posts on how to set attributes as read-only on Power Pages, but setting a multi-select field as read-only is a little bit challenging. Set Text Field Read Only $("#<attribute name>").attr("readonly", true); Set Multi-Select Read Only $("<div></div>").css({   position: "absolute",   width: "100%",   height: "100%",   top: 0,   left: 0,   background: "" }).appendTo($(".control").css("position", "relative")); By using the code above, you can easily set the multi-select field as read-only this won't hide the selected options.

Power Pages - Multi Select Field Show Hide and Set Business Required Using Javascript

Image
In this Power Portals blog post content, we are going to implement a multi-select field and use JavaScript to hide and show it based on user interactions. Enhance user experience and streamline data entry by revealing the field only when needed.  At the end of this post, you'll be able to hide and show fields based on the option selected in the multi-select field and make it business required as these two options are not available out of the box in power pages. Add the below code in your basic form additional settings. Code: $(document).ready( function () { var field = document.getElementById( 'new_multiselectparentfield' ); $( "#new_multiselectchildfield" ).parent().parent().hide(); // To Hide Multi Select Field var changeField = new MutationObserver( function (mutations) { console.log( 'changed' ); onDisplaySectionChange(); }); changeField.observe(field, { attributes: true , attributeFilter: [ 'value' ] }); MakeRequired( "new_mu...

Power Pages - Clickable Advanced Forms - Tab Like Forms On Portals

Image
clickable tabs stand out as a user-friendly solution that simplifies navigation and improves the overall user experience. In this short blog post, we will explore how we can get a multi-step form with clickable tabs functionality. At the end of this post, you'll be able to make something like this. 1. Create a page with n number of subpages 2. Create a web template using the code below < div id = "multiple-tabs" class = "wrapper-body" > < div class = "container" > < div class = "page-heading" " > {% block breadcrumbs %} {% include 'Breadcrumbs' %} {% endblock %} {% block title %} {% include 'Page Header' %} {% endblock %} <!-- ENTER TABS CODE HERE --> {% assign depth_offset = depth_offset | default : 0 %} {% assign current_page = current_page ...