Sunday, 19 July 2020

Coalesce in Power apps - Power Platform

Hi Everyone,

As we all know how we Coalesce() function in SQL, it returns the first non-null value in a list.

For example : If we run the below query, will get the results as StatureStack.com

SELECT COALESCE(NULL, NULL, NULL, 'StatureStack.com', NULL, 'mscrmtechie.blogspot.com');

In simple words, it just returns whatever the first non-null value.

In the same way, we can use Coalecse function in Power Apps formulas as well. Today, I have two variables which has been set from different logic and I had to write the formula to get the not null value between two of them. I used below formula to get the not null value between two variables.

Coalesce(variable1, variable2, ...)


Here is more information from Microsoft Docs

Hope this helps.

--
Happy 365'ing
Gopinath.

No comments:

Post a Comment