cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GrischkePro
Level: Powered On

Dynamic Column Names via Do Until

I have 20 date columns, like so:

 

triggerBody()?['Date1']
triggerBody()?['Date2']
triggerBody()?['Date3']
...
triggerBody()?['Date20']
and so on...
 
Is there a way to dynamically change the Date1 to Date2 and so on using Do until action?
 
I need to check each date with condition action, but I don't want to create 20 condition actions, I would like to do it within Do until action. In the future, I am planning to add more Date columns so that I can only update the Do until action to the number of date columns to check.
 
Is there a way to replace numbers only on the triggerBody()?['Date1']?
1 ACCEPTED SOLUTION

Accepted Solutions
GrischkePro
Level: Powered On

Re: Dynamic Column Names via Do Until

Ok I got it sorted.

 

Here's how:

 

Trigger

When an item is created (or modified)

 

1.jpg2.jpg

 

concat('Date',variables('intDateNumber'))

 

3.jpg

 

 

if(equals(triggerBody()?[variables('varTriggerBody')],null),0,ticks(triggerBody()?[variables('varTriggerBody')]))

 

 

1 REPLY 1
GrischkePro
Level: Powered On

Re: Dynamic Column Names via Do Until

Ok I got it sorted.

 

Here's how:

 

Trigger

When an item is created (or modified)

 

1.jpg2.jpg

 

concat('Date',variables('intDateNumber'))

 

3.jpg

 

 

if(equals(triggerBody()?[variables('varTriggerBody')],null),0,ticks(triggerBody()?[variables('varTriggerBody')]))

 

 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 48 members 4,927 guests
Please welcome our newest community members: