How Do I get the URL’s from an array of file names for a Get File activity and how do I get the number of elements in the array?
Hi @ron.butler
In addition to @gustavo.cervelin we can also try with the below expression!
YourArrayVar.count will give the count.
Regards
Hello again @ron.butler,
I’ve just noticed that this Get list item attachments returns an array of strings.
So, if you want to retrieve its content, you can use:
yourOutputVariableName(0)
to get the first element value
yourOutputVariableName(1)
to get the second element value
And so on…
You also can use a for each activity to iterate through the elements.
I am not sure this will return exactly what you are looking for.
So, feel free to give us more details and also feel free to share a screenshot of the values of the output string array (if they are not private data). So perhaps we can help you better.
Thanks!
Thank You Gustavo for your question.
I can’t figure out how to build the URL the “Get File” activity requires from the information delivered by the “Get list item attachments” activity, see screenshot below and Excel file attached has the info delivered by the “Get list item attachments” activity.
SP File List.xlsx (11.6 KB)
Sorry the activity for the excel was “Get List Items” to a data table variable not “Get List Items” gives an array of attached file names.
Hey @ron.butler
What is the version of SharePoint Activities you are using please ?
If possible please share your xaml for troubleshooting with project json.
Thanks
#nK
I’ve just found the documentation
Perhaps it and/or @radu_bucur can help us
Thank You, that is correct, I was having trouble remembering how to find that information.
Thank You, I will try building the URL from this information , I also found this in the document sent earlier in the replies,
Thank you all for your assistance.
Hi @ron.butler,
It’s a pleasure!
When you have a chance, take a look at the attached file.
Main.xaml (9.1 KB)
Don’t forget to change the values of the variables. Note: I didn’t configure the Sharepoint Activity Scope, but just replicate it in the same way you are already doing.
If you have any problems, let us know.
If it works, also let us know and mark the answer that helped you the most as solution to close this topic
Thanks!
The xml was very helpful, I just copied the For Each and set it to my existing variables and it worked like a champ. I used my existing Get List Items" activity to find the List ID value.
Amazing!!
I am glad it worked @ron.butler
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.