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

 

 

View solution in original post

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

 

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 105 members 5,462 guests
Please welcome our newest community members: