{"id":110889,"date":"2017-10-21T02:08:05","date_gmt":"2017-10-21T09:08:05","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/nested-apply-to-each\/"},"modified":"2017-10-21T02:08:05","modified_gmt":"2017-10-21T09:08:05","slug":"nested-apply-to-each","status":"publish","type":"power-automate","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/nested-apply-to-each\/","title":{"rendered":"Work with multi-level arrays with nested Apply to each and other updates"},"content":{"rendered":"

Apply to each inside of apply to each<\/h2>\n

This week we are happy to announce that Microsoft Flow can work with scenarios that have nested arrays<\/a>. You can now put an Apply to each<\/strong>\u00a0step inside of another Apply to each<\/strong> step. Nested arrays can happen when you use an action that returns a list of items. For example, you can use the\u00a0Office 365 Users<\/strong> connector to search for users in your directory. Each Office 365 user has a name, email, but also a list of phone numbers associated with them. This list of phone numbers is an array inside of another array, which up until now, was impossible to work with. Now, however, you can notify each of those phone numbers like this:<\/p>\n

\"\"<\/p>\n

In addition to Apply to each now being supported, you can also use any other actions that work with arrays, such as\u00a0Select<\/strong>\u00a0or Filter<\/b>\u00a0inside of Apply to each actions. One additional note, the\u00a0Add Dynamic Content<\/strong>\u00a0menu will only show items from one level of arrays, so if you want to access these nested items you’ll need to add an Apply to each first, and select the array before you can use the item.\u00a0<\/p>\n

Please note that the run history view cannot currently show the outputs from inside of nested apply to each.<\/p>\n

Work better with Dates and Times<\/h2>\n

There were several suggestions on the ideas forum asking for actions to work with Dates and Times inside of flows. This week, there is a new set of actions that address many of these ideas:\u00a0create a relative date, for example a time in the past or the future<\/a>,\u00a0get the current time as a action<\/a>,\u00a0convert times to Local time<\/a>, and use date time expressions<\/a>.<\/p>\n

To get started with these new actions, just select the new\u00a0Date Time<\/strong> connector. There you will see all of the actions, which help you to convert time zones to format them for local time in an email, add or subtract times, or just get the current time.\u00a0<\/p>\n

\"\"<\/p>\n

Each of these actions allow you to choose the format the of timestamp, so if you have another service that expect the time in a certain format you can configure that. In addition to these six new actions, there are also expressions that you can use inline in other actions to do the exact same things that these actions do.<\/p>\n

Four new connectors<\/h2>\n