Показать сообщение отдельно
Старый 30.11.2018, 14:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1201: Working with integer variables in Microsoft Flow
Источник: https://crmtipoftheday.com/1201/work...icrosoft-flow/
==============

In tip 1199, Leon Tribe talked about the power of using variables in Microsoft Flow. Leon astutely pointed out that using variables can simplify process development by allowing reuse of values between steps in Flow, and they can also be used for calculation purposes and building strings.

One challenge with working with integer type variables in Flow from a CDS/Dynamics 365 perspective is that you cannot directly write the value from an integer variable into a Dynamics 365 field.

Recently I created a Flow to calculate a contact score based on data quality–more about this in a future tip. As part of this flow, I created an integer variable called “score” to be used to calculate the data quality score.

Integer variable in Microsoft FlowAt the end of the Flow when I wanted to update the contact with the data quality score, I tried the three types of number fields in Dynamics 365/CDS–whole number, floating point, and decimal. The variable was being calculated, but I could not get the flow to update any standard number field (or text field) with the value of the integer variable.

The solution was to use the int() transformation expression. By using the expression int(variables(‘score’)), I was able to update a decimal number field in Dynamics 365 with the value of my integer variable.

(Cover photo by Nick Hillier on Unsplash)



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