![]() Returns the ascii character represented by the input number. If the input string has more than one character, the numeric value of the first character is returned. Returns the numeric value of the input character. String functions that can be used in Microsoft flows the substring and indexOf. Conversion functions are used to convert data and test for data types. After that, it creates an integer type variable that stores the conversion of. Power Automate String functions allow users to convert strings, string. Still, it is still possible with the current tools to format strings as acceptable DateTime inputs and use them to query Azure Table storage as well as populate typed entities in a Table. Using the stoi() function Initialize the string variable to store string values. I suspect Microsoft will continue to add expressions to Flow and include string to date conversion at some point, making the process above simpler. (where Outputs are values from other Flow Actions) Conclusion This is done by adding the data type into the JSON payload just prior to the value as such: The final step is to insert the formatted date into the Table as a DateTime typed value. (the first Output is dateReportStart and the second is dateReportEnd) With these dates formatted, I was able to query the Table with the following Filter Query: I also created dateReportEnd using similar expressions to format the report’s end date. Then I put the formatted DateTime string together in dateReportStart:Ĭoncat(split(body(‘Parse_JSON’)?,’/’),’-‘,outputs(‘dateReportStartMonth’),’-‘,outputs(‘dateReportStartDay’),’T00:00:00Z’) To calculate the dateReportStartDay, I used a similar expression: This expression adds a ‘0’ to the beginning of the month and takes the right two characters so that all months are depicted by two characters. Where body(‘Parse_JSON’)? is the report’s start date. To calculate the dateReportStartMonth, I used the following expression: I created 3 Compose actions for each date as such: I needed to first format my “m/d/yyyy” string to a standard DateTime format. The Problemįlow does a lot of things well but doesn’t have any out-of-the-box functions for converting strings to DateTime data types. If I didn’t need to query the Table by date, I could have simply added the date as a string and shaped it on the consumption side in Power BI. This required storing the date as a DateTime data type in the Table. Our reporting data does not contain unique fields that could easily be used as Row Keys and I wanted to make the process self-healing (avoid duplicate data while also being able to reprocess a report), so I needed to query the Table for existing entities by date. I decided to use Microsoft Flow for the automation and was challenged to import the reporting data into Azure Table storage. This process can be a bit time consuming, so I set out to automate the process and implement Microsoft Power BI reports. ![]() ![]() It typically involves massaging time tracking reports into more friendly formats. ![]() One of my responsibilities as the Solution Sustainment lead at ThreeWill is to provide monthly Sustainment usage reports to our clients. Being a consulting firm, you can imagine we do a lot of reporting. ![]()
0 Comments
Leave a Reply. |