cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akharns
Post Patron
Post Patron

Initialize Array

This should be easy.  I am trying Initialize Variable, type array, with the value ['20191001', '20191005'].  It thinks this is a string value.  What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @akharns,

 

Please use the double quotes instead of single quotes:Annotation 2019-10-14 155005.png

 

Annotation 2019-10-14 155019.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
ScottShearer
Super User
Super User

@akharns 

Try removing the single quotes around your numbers.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Then I can't force it to see the array elements as strings?

Hi @akharns 

 

You can intialise the array like @ScottShearer  mentioned. Later when you want to use these values as string then use the flow expression string function for conversion.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
v-litu-msft
Community Support
Community Support

Hi @akharns,

 

Please use the double quotes instead of single quotes:Annotation 2019-10-14 155005.png

 

Annotation 2019-10-14 155019.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

How to loop through an array and access the elements of it ?

Do I have to use a another variable which will store the index ? 

I want something like :

for(int i = 0; i < n; i++){

  print( array[i]);

}

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (3,085)