Hi Everyone,
I have been working on a workflow where I need to get all the entries which are duplicate against few user selected fields in the data set. The user has the ability to select any number of dynamic fields to check for duplicacy from the data set using list box.
The problem occurs when we don't get any option to select all the fields at once in "Only Unique tool" . I believe this can be done using "update using Raw XML" option in Action tool but I am not able to configure it to get the result.
For checking dublicate values, I am using "Only Unique Tool" from crew macro to get the desired output.
I have attached the sample workflow along with the sample data and output. Please help me with this. Thank you so much!
Here is an screenshot of the workflow .
Result after selecting Id and country for checking duplicate
Solved! Go to Solution.
Hi @sonaliabc
In order to use Update Raw XML with formula, you need to know the Raw XML that you're trying to update. You can open the workflow file in Notepad or your equivalent text editor of choice and hunt through the file to find the XML for the control in question. An easier way to do it is to check Display XML in Properties Window on the Advanced tab of the User Settings window.
This gives a new option in the configuration pane for all tools to display the corresponding XML for the tool
The piece that you'll be recreating is highlighted in green. And the way that you'll be creating it is in the List Box tool.
Check Generate Custom List and fill in the Start, Separator and End text fields with the corresponding XML from the Only unique tool
Start = <Field field="
Separator = "/><Field field="
End = "/>
In the action tool select Update Raw XML with Formula, select the Value field and use [#1] as the formula. [#1] is the place holder for the string coming from the List Box Tool.
This sets the correct XML for the Only Unique Macro.
Unfortunately, changing the mode in the List Box tool means that you can't use Update Select With Multi-Select List Box when connected to the Select tool. You now need to use Update Raw XML with Formula and pass the correct XML to the Select tool as well. the xml that you need to modify is the green part shown below
<SelectFields>
<SelectField field="ID" selected="True" />
<SelectField field="Country" selected="True" />
<SelectField field="*Unknown" selected="False" />
</SelectFields>
Luckily, the overall structure is similar to the the XML for the Only unique, so the formula in action tool for the Select tool is quite simple
replace(replace([#1],"<","<Select"),">",">")+'<SelectField field="*Unknown" selected="False" />'
It replaces "<" with "<Select", "<" with ">" and adds the XML for the Unknown field
Dan
Hi @danilang ,
Thank you so much for the detail breakdown.
I really appreciate your help and taking the time out to help me with the solution.
I have been able to achieve the desired output.