I cannot find the "Collection Operation" action or the "User Defined Action" in O365, is this feature not/yet available, and if not, do you have a road map of including these in the future?
My Problem: I am trying to follow a popular article from Vadim to "Query XML" from a repeating section. This is fine, however the result is a single long string, concatenated together, and I am not sure of a great action or method to divi up the string into appropriate variables using workflow for office365.
Any help on this would be great.
Solved! Go to Solution.
I guess one thing I could do is have a workflow that adds delimiters to my repeating fields, then use a search and replace string builder to get the data out..
But I am hoping there is a much better way to do this, really looking forwards to some feedback.
Andrew, NWF for O365 is a rather new product which runs on a different workflow engine. Hence you will still see some gaps in terms of available workflow actions/features between O365 and on-prem, but rest assured the dev teams are working hard to close that and you will soon have the same level of features in both products.
The collection data type in the O365 workflow engine has been enhanced with a data type called dictionary and there is a few dictionary actions available.
UDA are expected to be added later this year.
With regards to your requirement, you could use the QUery XML action and the dictionary data type/actions to achieve what you want to do. I don't have detailed steps on how to implement it but I hope I gave you a pointer in the right direction at this stage. The concept is similar to Vadim's blog, but rather than using a collection you'd use a dictionary.
Hi Patrick, this looks like an answer for me, thank you. Ill search the internet for usage of the dictionary in real scenarios, and if I can find one, ill mark this as the answer. If not ill ask you to provide one.
Thank you again.
I am now looking at the Build Dictionary action. I am still confused though on how to store
the data from my repeating section into the dictionary.
Here is an example of my XML field.
<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version
My Query XML action has the XPAth: /RepeaterData/Items/Item
This results in a single string: “computer1002200,display50150”
Can you please help me understand/show me how to use the Build Dictionary action here.
I was able to use repeating section in O365.
Here is a quick outline on how to accomplish it:
- In your associated Sharepoint Online list, add a multi-line text field (Call it "Items" as in Andrew's example)
- In the form, remove the default Items multi-line control and replace it with a repeating section control. Remember to connect it to Items. Add new controls inside the repeating section as needed and remember to create unique & useful control names. The repeating section and controls will store their data in Items using an XML format using the control names (XML objects) that you will use in the QueryXML action. (Andrews example uses: Assetitem, cost, qty, LineTotal)
- In the workflow, access the data by creating dictionary type variables(Assetitems etc) for each XML object and filling them with the Items XML data using the QueryXML action. the XPath will be //Assetitem etc. Dictionaries are simple 1 dimensional arrays that you can access via an index key. There is a good example in NODE below. To configure QueryXML action work for Andrew's example, use Field: Items, Xpath: //Assetitem and the Query results in: Assetitems to get 1 columns worth of data into your Assetitems dictionary. You will need to add 3 others to get all the repeating rows worth of data into 4 parallel dictionaries. Assetitems, costs, qtys, LineTotals
- You might also want to add the repeating section in the task form if you want it to display the data in a repeating section or you will get the same display that andrew showed in his example.
Hope that helps