cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

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
Highlighted
Advocate III
Advocate III

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')]))

 

 

View solution in original post

1 REPLY 1
Highlighted
Advocate III
Advocate III

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')]))

 

 

View solution in original post

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (6,913)