Posts

How to Prevent Past/Future Dates in PowerApps Using jQuery

Image
In the dynamic world of PowerApps development, ensuring the accuracy and reliability of data is crucial. One common challenge is preventing users from entering past or future dates, which can lead to inconsistencies and errors in your application. In this blog post, we'll explore a simple yet effective solution using jQuery to control date inputs in PowerApps. Preventing Past/Future Dates with jQuery in PowerApps: PowerApps provides a user-friendly interface for building applications, but sometimes additional customization is required to enforce specific business rules. The jQuery code snippet below demonstrates how to prevent users from selecting past dates in the "merp_date2" field: $(document).ready(function () { debugger; // Initialize the date picker $("#merp_date2").next().on("dp.change", function (ev) { var selectedDate = ev.date; // Get the current date var currentDate = new Date(); // Check if the

Fetch record based on any unique attribute and update the record using patch in canvas app

Image
 A Canvas app in Power Apps is a type of app that allows you to build custom business applications for various purposes, such as data collection, process automation, and data visualization. You can build Canvas apps using a drag-and-drop interface, with no coding required. You can also add custom logic to your app using Power Apps formulas and functions, or by integrating with other services and APIs. In this blog we are going to discuss a specific scenario which is to fetch a particular record fulfilling our filtering criteria and modifying the record using  Patch  function. We have a Contact table in Dataverse and each record in the Contact table has a unique  AutoNumber . Here we are trying to fetch the record by calling the unique  AutNumber  value and updating another attribute named  Score  of the record. Step 1: Add a textbox and a button to a blank page of canvas app. We will set the names of textbox and button as  txtBox  and  btn  respectively. Step 2: In the  OnSelect  prope