Using Sort, Distinct, Filter together for combo box Items– Canvas Apps (Dataverse)


Just sharing a simple example of applying a formula to the Combo box Items property, which includes Sort, Distinct, and Filter (If).

Below is our Combo Box bound to a lookup field of type Customer. If Contact is the option selected in the radio control, we want to show Contact’s Full Name sorted else Account’s Account Name field.

If( radioBtnCustomer.Selected.Value = "Contact",
    Sort(Distinct(Filter(Contacts,Status = 'Status (Contacts)'.Active),'Full Name'),
        Value,
        SortOrder.Ascending
    ),
    Sort(Distinct(Filter(Accounts,Status = 'Status (Accounts)'.Active),'Account Name'),
        Value,
        SortOrder.Ascending
    )
)

The result –

Also to clear the selection in the combo box when the user changes the option from contact to account and vice versa we can use the Reset function.

Check the below links to learn more about working with Customer lookup –

https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-references#show-the-columns-of-a-customer

Hope it helps..

Advertisements

Combo box showing blank values in case of multiple conditions – Canvas App (Dataverse)


Recently while trying to filter combo box Items we were getting the values but it was coming as blank instead of showing the name field.

Below is a sample Form – connected to Leads and Source Campaign is the combo box field (lookup to Campaign)

As we can see without applying the filter we can see the name (Display fields) populated.

Now let us try to filter it based on the Campaign Type field.

Here we have applied a single filter condition.

We can see the combo box getting filtered correctly.

Now we are introducing a variable just to filter it based on condition.

Till now filtering works as expected.

Now let us introduce else condition here.

We can see the combo box getting filtered but not showing the name field of the Campaign set as a display field. Through developer tools also, we don’t see the name returned in this case. The same is the case if we use multiple If or Switch in the formula.

The solution is to filter on Campaigns data source directly, instead of the corresponding Choice field in the Lead.

The result –

Hope it helps..

Advertisements

Fixed – Global variables are not allowed in StartScreen (PowerApps / Custom Page)


Recently while working on a custom page we had a requirement to show different screens on the app start based on a choice field in the record. (The custom page was being opened from a button/command on the form)

For the custom page’s App OnStart we were first removing the curly brackets from the recordID parameter passed to set the ContractId variable followed by setting ContractRecord variable using that GUID in the LookUp function.

Below is the JavaScript used to pass the parameters to the custom page (from the command/ribbon button)

Now based on Contract Type optionset field in the Contract record we wanted to show a different screen as the start screen. However, trying to use the Global Variable in the StartScreen function gave us the error – “Global Variables are not allowed in StartScreen”

The solution here was to use the Param recordId to get the record and set the start screen accordingly in the StartScreen instead of ContractRecord global variable.

Also check  – https://debajmecrm.com/how-to-dynamically-show-the-start-screen-of-an-app-in-power-apps-canvas-apps/

Hope it helps..

 

Advertisements

Notification template in Omnichannel Voice (Dynamics 365 Customer Service)


Below is the default notification the agent receives on incoming conversations/calls.

It is defined through the below out-of-the-box template.

Property

Description

Title

To define the title.

Icon

To define the icon.

Show Timeout

Yes / No – to hide/show the timer (timer still runs in the background)

Time (seconds)

For the Phone Call / Voice workstream the maximum value = is 150 seconds.

Auto-assign work items

Auto-assign incoming work item

Accept Button

Specify the text of the Accept Button

Reject Button

To hide or show the button

Show desktop notification

Never / When the app is in the background

Notification Fields

Specify fields to be shown in the notification using Slugs.

To make changes in the notification, we need to create a new notification template as we cannot update the box notification template.

Navigate to Agent Experience >> Workspaces >> Notification Templates (Manage)


Here we will create a new notification template to be used in place of Voice call – incoming authenticated – default template

For our custom template, we have made the following changes –

Increased the timeout value, and changed the text for Accept and Reject buttons.

Added notification fields and enabled Desktop notification.

Let us update one of our workstreams to use this custom notification template.

Navigate to Customer Support >> Workstreams – Open the workstream and open the Advanced Settings and update the Incoming Authenticated template in the Agent notifications section.

We can see the changes reflected in the Notification.

And also in the desktop notification –

 

 

 

 

Get all the details here-

https://neilparkhurst.com/2020/06/29/omnichannel-for-customer-service-notifications/

Hope it helps..

Advertisements

Fixed – Power Virtual Agents bots for voice not working (Dynamics 365 Customer Service Omnichannel)


We can configure aa PVA Bot for workstreams and when we install the voice channel demo, we can see a bot already configured for the demo workstream.

Recently in our case, the bot configured was not working and we were getting the below message on calling the workstream/voice channel configured.

“Sorry, we couldn’t serve you at this moment. Please call back later”

On removing the bot the workstream/channel was working properly.

We raised the Microsoft support ticket for the same and were suggested to create/configure a new bot instead of using the existing demo/trial one as it might give an issue because of being configured in a different environment.

On configuring a new bot the issue got fixed for us.

Hope it helps..

Advertisements

List Rows, Select Columns, and Lookup field – Power Automate / Dataverse


Suppose we want to retrieve the value of the source campaign lookup of the lead records.

The schema name of Source Campaign is – campaignid

To get its GUID in the Select columns of list rows we can specify it as

_campaignid_value i.e. _lookupschemaname_value

The other option is if we specify the schema name in select columns then we need to use the expand property to get the GUID as well if we want any other attribute values e.g. text/label of the lookup field.


Hope it helps..

Advertisements