Category: Uncategorized

Every PowerApps Formula You Ever Wanted To Know As A Functional Consultant

Hello Readers

This blog is to help fellow consultants to start their journey on PowerApps. We all know how easy it is to put together a screen on Canvas Apps but as and when we need a specific action on it or from it; we fall short of formulas/functions. That’s because we never required these formulas in Model Driven Apps.

But as Business/Functional Consultant, you want to deliver value to your client, make their life easier, Don’t you?

I am sure you do, so here I am providing you with 20 essential functions you must know as a functional consultant. This can be a starting point for you; well, Microsoft is trying hard for Business Users and Functional Consultants to get in the rink of Power Platform. Their learning path is specially designed for Business Users and Functional Consultants, check it out here Learn PowerApps.

All formulas below are simple and easy to understand. You’ll need it in everyday consulting; maybe for pre-sales, maybe for proof of concepts or maybe for a real world app.

1.Default a lookup in next screen based on the record created in previous screen

e.g create a contact first (in screen 1) then set primary contact when creating account (in screen 2)

Set Lookup fields datacardvalue’s ‘defaultselecteditem’ = Edit/New/FormN.LastSubmit

**N=Your form sequence

Picture 1

2.Set a lookup with required display field

Set Lookup fields datacardvalue’s ‘DisplayFields’ = [“Fieldname”]

Picture 1.png

3.Set a lookup with required search field

Set Lookup fields datacardvalue’s ‘SearchFields’ = [“Fieldname”]

Picture 1

4.Set a lookup with multiple search fields

Set Lookup fields datacardvalue’s ‘SearchFields’ = [“Fieldname1”, “Fieldname2”]

Picture 1

5.Nested grid

Filter(ChildEntityName,’LookupFieldName’. ‘PrimaryFieldName’ =ParentEntityGallery.Selected.’PrimaryFieldName’)

See account and contact example below; it shows related contacts of a selected account

Picture 1

6.Set Date/Date & Time to the current date/time

Set Data card ‘default’ = Now()

Picture 1

7.Set Date/Date & Time to current plus:

+30 minutes

Set Data card ‘default’ = Now()+0.5/24

Picture 1

+1 hour

Set Data card ‘default’ = Now()+1/24

+1 Day

Set Data card ‘default’ = Now()+1

+30 Days

Set Data card ‘default’ = Now()+30

Picture 1

8.Change No. of years that can be selected in date picker

Set the Start year and End year in the Date picker (Start and End date)

Set Date Value ‘Start Year’ or ‘End Year’ = Required Year

Picture 1Picture 1

9.Add Years to an End Date, date picker

Set date value Start or End Year = Year(Today())+N

**N=No. of Years

Picture 1 

10.Save a form (on button click) to create a record

Set button OnSelect = SubmitForm.FormN

**N= Sequence of form in your app

Picture 1

11.Save a form to create a record and navigate to a different screen

Set button OnSelect = SubmitForm.FormN;Navigate(ScreenN)

**N=Sequence of form/screen in your app

Picture 1

12.Save a form to create a record and show success message

Set button OnSelect = SubmitForm.FormN;Navigate(ScreenN)

**ScreenN=Your Success Screen

Picture 1

13.Set Camera to store photos in your PowerApps collection

Set Camera Onselect= Collect(colPhoto,CameraN.Photo)

**CameraN=Your Camera Sequence

Picture 1 

14.Set entity image to last photo taken by camera

Set EntityImageDataCard’s Image’s Image = If(IsBlank(CameraN.Photo), Parent.Default, CameraN.Photo)

**CameraN=Your Camera Sequence

Meaning of this function- if cameraN does not have any picture in it (as in you haven’t clicked anything yet) then entity image would take its default value. But if you have clicked a picture; entity image will pick that image.

Picture 1

15.Select a record from a grid

Set Icon’s ‘OnSelect’ = Select(Parent)

Picture 1 

 

16.Open a record from a grid

Set Icon’s ‘OnSelect’ = Select(Parent);Navigate(ScreenN)

ScreenN=View/edit screen

Picture 1 

17.Delete a record on a grid

Set Icon’s ‘OnSelect’ =RemoveIf(datasource, primaryfield = GalleryN.Selected.primaryfield)

Picture 1

18.Setting up a logo on screen

Insert Tab>> Add Image>>Upload>> Resize from properties

Picture 1

19.Setting up a background image

Insert Tab>> Add Image>>Upload>> Resize>>Send to back

Picture 1

 

20.Rounding an Image

Click on image and set height and width equal

Picture 1

Now set, RadiusTopLeft =RadiusTopRight=RadiusBottomLeft=RadiusBottomRight=ImageN.Height

**Under Advanced on the right of your screen

Picture 1

Those are enough formulas to get you started. 🙂

Hope you find this helpful!

Subscribe to my YouTube

Happy CRMing !!

 

Make A Better First Impression With Visitor Sign In App (PowerApps)

Hello Readers

This is a quick blog to let you know about my give away app. This app will help you in the following:

  1. Tracking visits to specific centre facility
  2. Creating Visitors
  3. Create Visits on your mobile and get rid of your notebook
  4. Market membership and other services to visitors based on visit trends

You no longer need to print or file papers for a visitors sign in or entry. You can even extend it to a level that employees can be informed of the visitor.

Github: https://github.com/diyd365/Visitor-Register-PowerApps-

In order to consume the App, you will need to follow the steps below:

Step 1: Install the Model Driven App solution to your D365 CE environment. This includes:

Entity Views Forms
Contact (OOB) Member/Visitor (Custom) Member Visitor (Custom)
Visits (Custom) Active and Inactive Visits
Facility/Equipment (OOB) All All

One Dashboard- Visitor Management

Screen Shot 2019-08-16 at 2.23.57 pm

Screen Shot 2019-08-16 at 2.25.18 pm

Step 2: Import the PowerApps to your make.powerapps.com environment. This includes:

Screen Components
Entry Screen Visit form
Success Success and Navigate back
New Visitor Contact form

Camera

Profile Pic

Screen Shot 2019-08-16 at 3.22.43 pm

Here’s a short video:

Hope it helps!

Happy CRMing!

Configuring a ClickDimension web form and creating cases in MS CRM on web form submission (Part 2)

Create Web Content: Go to settings>>ClickDimensions>>Web Content>>New

Enter an appropriate name, select the type of your web content, Lookup your domain; Under ‘Create new visitor as’ select Lead or contact, if required. Following types of web content can be created:

  • Form (current scenario)
  • Survey
  • Subscription
  • Landing Page

In ‘Auto response email’ select a clickdimensions email template and under ‘email subject’, type a suitable subject. Once you are finish entering details, click ‘save’. Once saved, you can now design your web form by clicking on ‘design’. If you want your web form to be compatible and responsive for mobile devices, do select ‘yes’ in ‘Web Responsive’

12

On clicking ‘Design’, following screen will pop up

13

On your right you can see, available fields for web form. After making changes, save the form and click preview:

14

Once ready, you can embed URL in your website or blog, by clicking on ‘Embed’. For more details http://help.clickdimensions.com/embedding-web-content/

15

After your design is complete, click on ‘publish’

16

Posted Forms: Every time a form is submitted on the website, a ‘Posted form’ and a ‘lead’ record is created in MS CRM. Post Form is a ClickDimension entity. Posted form will include info about any related lead or contact or both. To know more http://help.clickdimensions.com/posted-form-records/

17

Limitation to achieve my objective: I could have used the lead record created after submission on website and converted it to a case via workflow automation of MS CRM. But Clickdimensions creates a lead in the system, with one email id just once; after which if any submissions come from the same email id, it will only update the existing lead record and not create a new lead. But as we know ‘Feedbacks/Cases/Complaints’ can come multiple times from the same email id; this didn’t work for me.

Solution: I used the ‘Posted forms’ instead of using leads. So I created a workflow in MS CRM, which was- On creation of ‘Posted form’, create a case in MS CRM. All details in this case are prepopulated from my Lead record which is linked to (lookup reference) Posted forms. Below screenshot might help:

18

Hope you find this post useful!

Drop your questions & suggestions in the comment box below.

Thank you for reading!

Happy CRMing!!

Configuring a ClickDimension web form and creating cases in MS CRM on web form submission (Part 1)

I am a beginner for ClickDimensions related work. Recently at a client, I was asked for a web form design and its integration with their website; that’s when I started using ClickDimesnions. Following post will take you through, configuration & set up of ClickDimensions along with some tweaks in MS CRM:

Products Used: MS CRM 2016 & ClickDimensions

Features & Licensing: http://clickdimensions.com/pricing

Request a trial solution: If you are a ClickDimensions Partner, you can request for a trial of 30 days- http://clickdimensions.com/partners/partner-demo

Once you fill in details for your demo account on the URL specified above, you will receive an email for ‘registration’. Registration includes more details on your MS CRM organization like:

  • Date Centre Location
  • MS CRM Version
  • Organization URL
  • Organization Unique ID (Can be found under settings>>Customizations>>Developer resources)
  • Login ID

1

Image Source: www.clickdimensions.com

You will receive an email to download the managed solution, shortly after you complete the registration form. Once you download the solution, it can be imported in your MS CRM organization.

Once the solution import is successful, refresh your CRM organization and you will be able to see the new entities & features.

 

2

3

4

Objective: To create a web form, integrate it to the website and MS CRM. On submission of form, a ‘Case’ must be created in MS CRM.

Limitation: ClickDimension lets you create either lead or contact (based on your selection in CRM) but not cases

Tip: Create all custom fields and identify all standard fields which you would be using for your web form, before getting into ClickDimensions configuration

  

Configuration

Following are the key steps to be followed for my ‘objective’ to get an output:

Create Domain: Click on Settings>>ClickDimensions>>Domain>>New

5

Domain: ‘Name’ field on the form, is the place where you will enter ‘domain’ of your website. It must be without http and www.

Sub Domain Alias: This is not a mandatory field. If you don’t want to enter this, your web form URL will include clickdimensions domain details and not your website’s like http://au-clickdimensions.com/smsmtcom-ae3mt/pages/oa0cnh1eeaa58q0a8uyoa.html While if you provide sub domain, your URL will include your subdomain like http://web.smsmt.com/smsmtcom-ae3mt/pages/oa0cnh1eeaa58q0a8uyoa.html

You can test your ‘sub domain alias’ by clicking on ‘Alias’ button

6

If you see the following screen, that means you are on track:

7

If you do not have a sub domain alias yet and would like to set it up, go to http://help.clickdimensions.com/setup-cnames/

Create Form Fields: This is different from what you have done for your CRM entities. This is entirely about the web form we want to place on our website. Go to settings>>ClickDimensions>>Form Fields>>New

8

Enter a name for your field, select a field type and type ‘Form Field ID’

Following are the types of Form Fields:

It is really important to have at least one email field on your web form. This would avoid duplication because email id is checked against all MS CRM Leads & Contacts, after submission. If the email id already exists in CRM, data is updated against existing record while if email id does not exists in MS CRM, a new record is created.

Form Field ID: Enter any unique text here, if you are going to use standard form builder (current scenario) but if you have to integrate your forms with a form capture visit http://help.clickdimensions.com/steps-to-check-before-using-form-capture-records/

Once you click on ‘save’, mapping will be enabled on the form, so, that you can map it to lead or contact field or both

9

Tricks on Form Fields: You might not immediately see your custom fields under ‘mappings’, you can overcome this issue by changing your field type to ‘list’ and then click on ‘publish custom fields’ under mappings. This will bring all your custom fields under mappings. Once done, you can change ‘field type’ back to its previous state (Text in current scenario)

10

Read more about Field Mappings here http://help.clickdimensions.com/create-individual-form-fields/

In Part 2, we will learn about creating web content and Posted forms

Hope you find this post useful!

Drop your questions & suggestions in the comment box below.

Thank you for reading!

Happy CRMing!!

Adding a Member from one Marketing List to Another

MS CRM (version 2015 onwards) now provides you with the flexibility to add a member from one list to another. Marketing List can have members from following record type or entities:

  • Lead
  • Contact
  • Account

A lot of people are not aware about this feature but this really helpful.

Without this feature, we use to go to the Marketing List and add members by using lookup or advanced find. On the contrary this one is easy to do and take less steps and clicks.

Let’s see how it works: (I am taking an example of a Marketing List having member type as contact)

Go to Marketing>>Marketing Lists

1

Click on Marketing List and you will be redirected to List/Grid view of Marketing Lists

2

Click and open the list whose members you want to add to another list

3

Under the members subgrid, click on record associated view as highlighted above and you will be taken to the associated view as shown below:

4

Now select all the members you want to add to another list, once you select members; click on the ellipses and then click ‘add to another marketing list’ as shown below:

5

On clicking ‘add to another marketing list’, look up window with all related member type lists will pe presented on the screen. You can select the desired list and click ok, its done.

You can also create a new list by clicking on ‘new’ and add members from this list to the new list

6

Note: There is a known issue, that this feature is not working on MS CRM 2016 online and on-premise. You have to update your on-premise solution to SP1 and online solution to Update 1; and it works fine then.

Important: This feature works for following scenarios:

You can add members of You can add member to
Static List Static List
Dynamic List Static List
You can’t add members of You can’t add member to
Static List Dynamic List
Dynamic List Dynamic List

Hope you find it helpful !

Thanks for Reading !

Happy CRMing !!

Calculating Time Spent (in minutes) on an activity via Javascript in MS CRM 2015

Hello Readers,

its been so many days, I was waiting to write something very commonly required yet useful feature.

I have been asked so many times by my customers, How can i see the time spent on an activity, if we have entered the ‘Start Time’ & ‘Finish Time’. Yes, we can, its easy and simple. This time calculation can also be used for calculating, how much total we spent on a case resolution if we replace ‘Start Time’ by ‘Created on’ & ‘Finish Time’ by ;Actual Resolution on’ ; so on and so forth there can be multiple usage of this javascript based on your time calculation requirements. In this scenario, i am taking up a custom activity called ‘Repair Activity’; following is a screenshot:

b2

 

Please note that the time spent field is a Deciaml Field

We need to follow the following steps:

Step 1: write the Javascript code as shown below-

function time()
{
var stdate=Xrm.Page.getAttribute(“new_starttime”).getValue();
var endate=Xrm.Page.getAttribute(“new_finishtime”).getValue();

if(stdate==null && endate==null)
{
alert(“Please enter the Start Time / Finish Time…”);
return false;
}
if(stdate==null)
{
alert(“Please enter the Start Time !”);
return false;
}
if(endate==null)
{
alert(“Please enter the Finish Time !”);
return false;
}

var st=stdate.getTime();
var ed=endate.getTime();
var sdiff=(ed-st);
var h=(sdiff/60/1000);
var p=parseInt(h);
var tm=p.toString();
Xrm.Page.getAttribute(“new_timespent”).setValue(tm);
}

Step 2: Add a webresource in CRM

Add a new webresource by typing in a name, Display Name, Language & Type>>Save & Publish>>URL will be genrated

b6

 

Step 3: Add this webresource to form Libraries

Go to ‘Repair Activity’ Form Editor>> Form Properties>>Form Libraries>>Add

b5

And also manage the ‘Event Handler’ by setting the event when you want this Javascript to be executed, so, i will set it on ‘On Save’ & set control to ‘Form’ & click OK

b7

Once done save the form & publish it

Result : That’s it, here you go,now we can see the time spent as soon as we save the form; this javascript also, gives us an alert if we have not provided any value in Start & Finish time

b8

b9

Happy CRMing !!