AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
CRM
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 25.04.2019, 14:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1257: Learn Compose action in Flow
Источник: https://crmtipoftheday.com/1257/lear...ction-in-flow/
==============

I wanted to name this tip “Do not use variables in Flow” but then it would have been a click-bait, not a tip.

Yesterday we worked our way through the concept of getting an attribute of the first record from the list. The very first step we avoided was to “declare the variable”. Yes, it would have worked but unless we intend to modify the value, it’d be a one-off assignment.

If you need a result of an expression and you are not planning to modify the value then, instead of a variable, consider using Compose action (which takes its name from the intent of taking multiple inputs and building a single output).

Using the same example (getting the full name of the last created contact for an account):

Expression in the Last Contact’s FullName Compose action is (note the use of ? to avoid runtime errors):

body('Get_Last_Contact')?['value']?[0]?.fullnameExpression in the results check is:

empty(outputs('Last_Contact''s_FullName'))Advantages of using Compose:
  • No overhead of creating and maintaining the variable
  • Can be used in a scope (variables can only be declared at the top level)
  • Simples!
The only downside I can think of (besides of using – gulp – code!) is that the only visual property available is Output which could potentially make the downstream use unclear.




Источник: https://crmtipoftheday.com/1257/lear...ction-in-flow/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crmtipoftheday: Tip #1247: Why you should rename your steps in Flow Blog bot Dynamics CRM: Blogs 0 03.04.2019 17:11
crmtipoftheday: Tip #1205: Local time in Flow using Common Data Service Blog bot Dynamics CRM: Blogs 0 06.12.2018 18:11
crmtipoftheday: Tip #1124: Flow Approvals May Be Exactly What You Need Blog bot Dynamics CRM: Blogs 0 25.06.2018 12:11
crmtipoftheday: Tip #1094: It is Time to Go with the Flow Blog bot Dynamics CRM: Blogs 0 27.03.2018 09:11
atinkerersnotebook: Using Functions within Flow using the Compose Action Blog bot DAX Blogs 0 23.03.2017 22:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 09:12.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.