cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Zachariah
Frequent Visitor

Stuck in how to use an array of indices to pull strings from another array

I am trying to work out how use an array of indexes to pull strings from the corresponding position in another array.

 

For example:

 

arrayIndices = [0,4,6]
StringArray = ["string 1", "string 2", "string 3", "string 4", "string 5", "string 6", "string 7"]

resultsArray = []

 

 

The desired result would be:

 

 

resultArray = ["string 1" "string 5", "string 7"]

 

 

I am not sure how to achieve this in PowerUltimate.  Could I achieve it via nesting an apply to each loop in another apply to each loop?

Would that be the best approach?

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

Like this:

2022-07-04_16-39-22.png

Blog: tachytelic.net

YouTube: https://www.youtube.com/c/PaulieM/videos

If I answered your question, please accept it as a solution 😘

View solution in original post

1 REPLY 1
Paulie78
Super User
Super User

Like this:

2022-07-04_16-39-22.png

Blog: tachytelic.net

YouTube: https://www.youtube.com/c/PaulieM/videos

If I answered your question, please accept it as a solution 😘

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,173)