Monday, April 25, 2022

How to Retrieve More than 256 Rows from Excel using Microsoft Flow

Introduction


In this Blog we will see how to retrieve More than 256 Rows from Excel using Microsoft flow


Implementation Steps:

 

1. Create an Excel or Upload the Existing Excel in OneDrive.

 

2. Open the Excel and Check How Many Rows Available. in my case i have 373 Rows Available

 

rampprakash_0-1650869401774.png

 

3. I Uploaded it in OneDrive

 

rampprakash_1-1650869425619.png

 

4. Once Done ---> Navigate to https://flow.microsoft.com

 

5. Click Instant Cloud Flow and Select PowerAutomate and Input Name for the Flow

 

rampprakash_2-1650869494356.png

 

6. Once Clicked On Create --> Select Excel Online (Business) --> Then Choose List Rows Present in Table

 

rampprakash_3-1650869629504.png

 

7. Then Select the location Where the Excel is Available

 

rampprakash_4-1650869741699.png

 

8. Now for Testing Purpose i will Add a Apply For Each to Check How Many Rows its Retrieving.

 

rampprakash_5-1650870506453.png

9. Now We are done --> Click Test --> And Expand Apply to Each 

 

rampprakash_6-1650870708019.png

 

10. Now you can see only 256 Record Retrieved

 

11. Let's See how we can change this

 

12. Click On Three Dots in Excel (List Rows Present in the Table) and select Settings

 

rampprakash_7-1650870804833.png

 

13. Turn On Pagination and Select Threshold Value to 1000(it Depends) and Click DONE

 

rampprakash_8-1650870859381.png

 

 15. Now --> Save the Workflow and Test Again

 

16.  Now you can see all the Rows from Excel.

 

rampprakash_9-1650870963609.png

 

That's it :slightly_smiling_face:

Wednesday, April 13, 2022

How to Concatenate String in Canvas PowerApps

Introduction:


In this Blog we will see how to Concatenate String in Canvas PowerApps


Implementation Steps:

 

1. Navigate to https://make.powerapps.com

 

2. Click Apps --> Click New --> Select Canvas App --> Then Input Canvas Name and Select Tablet or Phone and  Click Ok

 

rampprakash_0-1649846493428.png

 

3. Add a Label Field By selecting Insert 

 

4. Using C# or Any Other Code we can Simply Concatenate the Values like below

  • "Hi" + " Welcome" + " to" + " PowerApps"

5. But in Canvas we need to use it in Different way

 

Lets see how we can Concatenate in Canvas PowerApps

 

Instead of using + we need to use & Operation for Concatenating the String values

 

 

"Hi"&" Welcome"&" to"&" PowerApps"

 

rampprakash_1-1649846837792.png

 

That's it :slightly_smiling_face: 

Tuesday, April 12, 2022

Clone OOB/Custom Entities in Dataverse Environment using Plugins

Introduction:

In this Blog, we will see how to clone OOB/Custom Entities in Dataverse or MSCRM Environment.

Scenario:

 

Consider I have an Opportunity Entity Available, once the Opportunity is WON or LOST, we want to Clone that Opportunity with Exact Same Details.

 

Let's see how we can achieve this. 

 

Note:

 

This Code is not only Restricted to OOB Entity, we can use this code in Custom Entity too

 

Implementation Steps:

 

You can write the below code in your Plugins.

 

 

Entity getOpprotuntiyRecord = (Entity)context.InputParameters["Target"];
Entity cloneRecord = service.Retrieve("opportunity", getOpprotuntiyRecord.Id, new ColumnSet(true));
cloneRecord.Attributes.Remove("opportunityid"); cloneRecord.Id = Guid.NewGuid(); Guid getCreatedOpportunity = service.Create(cloneRecord);

 

 

In the Above Code i mentioned as 

 

opportunity --> Change it based on your Entity Logical Name

opportunityid --> Entity Logical Name Primary Unique id name

 

That's it :slightly_smiling_face:

 

If Suppose you want to add some value to NAME Field while Cloning means you can write below code

 

Entity cloneRecord = service.Retrieve("opportunity", getOpprotuntiyRecord.Id, new ColumnSet(true));
cloneRecord.Attributes["name"] = cloneRecord.Attributes["name"].ToString() + " Renewal"; cloneRecord.Attributes.Remove("opportunityid"); cloneRecord.Id = Guid.NewGuid(); Guid getCreatedOpportunity = service.Create(cloneRecord);

 

You can Just Add the LOGICAL NAME while replacing.

Thursday, April 7, 2022

Disable Auto Save for Individual Forms in Model Driven Apps

Introduction:


In this Blog, we will see how to Disable Auto Save Functionality on Particular Form Using JavaScript.


Implementation Steps:

 

In my Previous Blog I have explained how to enable or disable AUTO Save functionality in Model Driven Apps. In this Blog we will see how to Prevent Auto Save in Particular or Individual forms using JavaScript.

 

Steps to Follow:

 

1. Navigate to https://make.powerapps.com

 

2. Navigate to Solution and Open the Solution which you already have else Create a New Solution

 

3. Create or Add Existing Table where you want to Prevent Auto Save functionality.

 

4. Once Table is Added, Add your Existing Web Resource. Else Create a new Web Resource.

 

5. Steps to Follow to Create a Web Resource

 

6. Add below JavaScript into your Web Resource

 

 

 

function preventAutoSave(executionContext) {
    var formContext = executionContext.getFormContext();
    var eventArgs = executionContext.getEventArgs();
    if (eventArgs.getSaveMode() == 70) {
        eventArgs.preventDefault();
    }
} 

 

 

 

7. Please find the Event Modes that will perform on SAVE operation

 

Event ModeValue
 Save1
 Save And Close2
 Save and New59
 Save as Completed58
 AutoSave70

 

8. Now Open the Table where you want to add Web Resource --> Click Forms --> Open the Form

 

9. Once Form Opens Click Form Library and Click Add Library and Search for the Library and Select the Check Box and Click Add

 

rampprakash_0-1649167174499.png

 

10. Once Added --> Click Events at the RIGHT Side --> Select OnSave --> Click ADD EVENT HANDLER --> Input Function name as preventAutoSave --> Make Sure You Select Check Box - Pass Execution Context

 

11. Now Click Ok --> Click Save and Click Publish.

 

That's it :slightly_smiling_face:

Tuesday, April 5, 2022

Create a Web Resource in Model Driven Apps

Introduction:


In this Blog we will see how to Create Web Resource in Model Driven Apps.


Implementation Steps:

 

1. Navigate to https://make.powerapps.com

 

2. Click Solutions

 

3. Create a new Solution 

 

rampprakash_0-1649164788241.png

 

4. Click Create to Create a Solution

 

5. Once Solution gets Created --> Open Your Visual studio to Create  a JavaScript file ( Web Resource is not restricted to JS alone), please find the Screenshot below for the list of items we can create in Web Resource

 

rampprakash_2-1649164965185.png

 

 

6. I have taken VS to Create a new JS file

 

rampprakash_3-1649165202131.png

 

7. I have Written Some Sample JS Code

 

rampprakash_4-1649165280701.png

function sampleJavaScript() {
    alert("hello");
}

 

 

8. Once JS is Ready open the Created Solution  --> Click New --> Click More --> Click Web Resource

 

rampprakash_1-1649164869558.png

 

9. Input the Display Name/Name/Type 

 

10. In My Case Type as JavaScript --> Then Click on Browse --> Select the JavaScript which we have created

 

rampprakash_5-1649165438725.png

 

11. Click on Save.

 

That's it :slightly_smiling_face:

 

Then we can add this JavaScript in Any Place of Forms Etc.,.

Monday, April 4, 2022

How to find Difference between two dates in Hours with calculated fields in Model Driven Apps

Introduction:


In this Blog we will see how to find Difference between two dates in Hours with Calculated Fields in Model Driven Apps


Implementation Steps:

 

1. Navigate to https://make.powerapps.com

 

2. Click Solutions (if Already Available) else create a new Solution and add New Table or Existing Table

 

3. Create a new Field inside that Table (Start Date)

 

rampprakash_0-1649055496006.png

 

4. Create another field called End Date 

 

rampprakash_1-1649055496009.png

 

5. Save the Table

 

6. Create a Whole Number Field as Calculated

 

rampprakash_2-1649055496013.png

 

7. Click Calculation --> It will save the table and open a Separate Tab.

 

8. Once the Page Opens add following Condition

  •    Start Date Contains Data
  •    End Date Contains Data

9. Add DiffInHours (It is used to find difference between two dates)

 

10. Write below Query in the Action Field

 

DIFFINHOURS(cr2f9_startdate, cr2f9_enddate)

 

rampprakash_0-1649065757537.png

 

 

11. Now add 

  • Start Date
  • End Date
  • Difference in Date 

Fields into the Form.

 

12. Open a new Record and Input Date and Click Save

 

Positive Number : (End Date is Future)

 

rampprakash_1-1649065973474.png

 

 

 

Negative Number : (End Date is Past)

 

rampprakash_2-1649065994935.png

 

 

 

That's it :slightly_smiling_face:

How to Import Data from Excel to Multiple tables in PowerApps

Introduction:   I have created a view on how to import data from excel to multiple tables in Canvas PowerApps   Implemented Steps: ...