You are viewing limited content. For full access, please sign in.

Question

Question

Does Not Contain Workflow Condition

asked on January 25, 2018 Show version history

I have question or am having some difficulty using the Does Not Contain condition of a Workflow Conditional Sequence.

 

I'll attach a screenshot of my workflow, but essentially I'm querying one database of employees who have submitted a disclosure, and comparing it to the list of all employees.  (Both using employee numbers.)  I'm adding both to different multi-value tokens, 'Have Submitted' and 'All Employees.'  

 

I'm cycling through each value in the 'All Employees' value, and seeing if the 'Have Submitted' token does not contain the current value of the 'All Employees.'  

 

The problem I'm encountering is it returns True for every single value of 'All Employees.'

 

For example:  This is one of the evaluation results of the condition.  All of the values of the 'Have Submitted' token are included, and are being compared to the value of the current 'All Employees' number, which is 421.  Workflow should be returning true if 421 is not contained.  However, 421 is clearly present (marked in bold), and should return False.

 

[TRUE] If all of these conditions are true:
	[TRUE] Entry Token [Have Submitted]:  '616', '2093', '1761', '1602', '1739', '1843', '2139', '2213', '1877', '2129', '2060', '1004', '1430', '1872', '2050', '2191', '1668', '1470', '2186', '2044', '2169', '1897', '1725', '2214', '1894', '2173', '2062', '2066', '2115', '1352', '362', '2146', '1833', '1885', '1601', '1500', '200', '1850', '1786', '2215', '900', '990', '2120', '927', '2094', '1825', '1732', '1818', '2180', '1921', '1589', '2092', '1616', '1792', '1027', '2121', '1821', '2183', '1731', '2208', '1603', '2171', '2167', '421', '2012', '1048', '1243', '2145', '2117', '1708', '1928', '1756', '2210', '1883', '2088', '1890', '2163', '2053', '1778', '1896', '1898', '2134', '2113', '1673', '1730', '1961', '2211', '1760', '1110', '2185', '2209', '1946', '2020', '738', '2091', '1789', '2179', '2005', '2083', '2026', '1738', '2166', '2194', '2170', '1875', '1823', '2095', '2006', '2039', '2064', '2086', '1887', '1916', '1347', '1208', '1469', '2189', '974', '1989', '1570', '1977', '2056', '2081', '2078', '1809', '1117', '914', '1937', '1900', '2097', '376', '1437', '1507', '2128', '1838', '1985', '1617', '897', '1997', '2138', '1400', '2025', '1949', '2155', '1542', '1065', '1698', '1993', '1960', '1590', '1476', '2218', '651', '1847', '2196', '1808', '2143', '1442', '1743', '1845', '1700', '1834', '1623', '1550', '1956', '1481', '2098', '2203', '2111', '2164', '1330', '2200', '2199', '2219', '1683', '1587', '2217', '2077', '2161', '1256', '2222', '1891', '2118', '2203', '2187', '1276', '2172', '1798', '1715', '2212', '1656', '1995', '2086', '1641', '1705', '1127', '2100', '2082', '2202', '1836', '2193', '2197', '1687', '2221', '2195', '2142', '1982', '1723', '1880', '2226', '1712', '1405', '2165', '2055', '2052', '224', '2125', '1736', '1790', '2023', '2152', '1933' <does not contain> '421'

I'm getting a True result for every 'All Employee Value.'  We have 279 employees, with 222 having submitted.  So their should be 57 false results.

 

Is there something incorrect with my logic or workflow construction?  Or am I missing the general functionality of the Does Not Contain Conditional Statement?

 

Thanks for any help.

 

We are using Workflow version 10.2.0.216

Capture.JPG
Capture.JPG (38.46 KB)
0 0

Answer

SELECTED ANSWER
replied on January 25, 2018

Evan,

When working with "Does Not Contain" conditions on multi-value tokens, the behavior is not exactly what you might expect.

The problem you are encountering is that it evaluates the values individually, so even though a value may appear in the list, it will usually return true because not ALL of the values contain the target value.

The recommended approach is to first flatten the multi-value token into a single-value token with some kind of delimiter before using it in the left part of the condition.

For example

  1. Create a token called "Have Submitted ALL"
  2. Set your multi-value token as the value
  3. Right-click the token and open the Token Editor
  4. Check "Apply Index"
  5. Check "All values separated by" and pick a delimiter
  6. Use the "Have Submitted ALL" token for your condition

 

It should look something like %(HaveSubmitted#[, ]#) and doing this will force Workflow to evaluate the values as a collection instead of individually and that should get your condition working as expected.

3 0

Replies

replied on January 25, 2018

Thanks Jason!

 

That works perfectly!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.