• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Fighting ER sys func Set Selection Group again - anyone have new insights.

BOster

Legendary Poster
Seems like every time I try and use the APPL ER sys func "Set Selection Group" I post to jdeList. So has anything changed from?

http://www.jdelist.com/vb4/showthread.php/43216

I think I am doing something pretty similar what WhippingBoy was working on at the time. I have it working but the SQL results in a superfluous amount of parenthesis. God help the DBA that may have to one day analyze SQL from my code.

This:
Code:
0028 Clear Selection(FC Grid)
0029 If FC Show Zero Quantities is not equal to "1"
0030    Set Selection Append Flag(FC Grid, <Yes>)
0031    Set Selection Group(FC Grid, "F41021", "PQOH", <Not Equal To>, <Zero>, <And>)
0032    Set Selection Group(FC Grid, F41021, "PBCK", <Not Equal To>, <Zero>, <Or>)
0033    Set Selection Group(FC Grid, F41021, "PREQ", <Not Equal To>, <Zero>, <Or>)
0034    Set Selection Group(FC Grid, F41021, "QWBO", <Not Equal To>, <Zero>, <Or>)
0035    Set Selection Group(FC Grid, F41021, "OT1P", <Not Equal To>, <Zero>, <Or>)
0036    Set Selection Group(FC Grid, F41021, "OT2P", <Not Equal To>, <Zero>, <Or>)
0037    Set Selection Group(FC Grid, F41021, "OT1A", <Not Equal To>, <Zero>, <Or>)
0038    Set Selection Group(FC Grid, F41021, "HCOM", <Not Equal To>, <Zero>, <Or>)
0039    Set Selection Group(FC Grid, F41021, "PCOM", <Not Equal To>, <Zero>, <Or>)
0040    Set Selection Group(FC Grid, F41021, "FCOM", <Not Equal To>, <Zero>, <Or>)
0041    Set Selection Group(FC Grid, F41021, "FUN1", <Not Equal To>, <Zero>, <Or>)
0042    Set Selection Group(FC Grid, F41021, "QOWO", <Not Equal To>, <Zero>, <Or>)
0043    Set Selection Group(FC Grid, F41021, "QTTR", <Not Equal To>, <Zero>, <Or>)
0044    Set Selection Group(FC Grid, F41021, "QTIN", <Not Equal To>, <Zero>, <Or>)
0045    Set Selection Group(FC Grid, F41021, "QONL", <Not Equal To>, <Zero>, <Or>)
0046    Set Selection Group(FC Grid, F41021, "QTRI", <Not Equal To>, <Zero>, <Or>)
0047    Set Selection Group(FC Grid, F41021, "QTRO", <Not Equal To>, <Zero>, <Or>)
0048    Set Selection Group(FC Grid, F41021, "QTO1", <Not Equal To>, <Zero>, <Or>)
0049    Set Selection Group(FC Grid, F41021, "QTO2", <Not Equal To>, <Zero>, <Or>)
0050 End If
results in this SQL:
Code:
SELECT LILOTN,LIPBIN,LILOCN,LIITM,LIMCU 
FROM DVDTA.F41021 
WHERE 
(
	(
		(
			(
				LIMCU = ?  AND LIITM = ? 
			) 
			AND 
			(
				(
					(
						(
							(
								(
									(
										(
											(
												(
													(
														(
															(
																(
																	(
																		(
																			(
																				(
																					LIPQOH <> ?  OR LIPBCK <> ? 
																				) 
																				OR LIPREQ <> ? 
																			) 
																			OR LIQWBO <> ? 
																		) 
																		OR LIOT1P <> ? 
																	) 
																	OR LIOT2P <> ? 
																) 
																OR LIOT1A <> ? 
															) 
															OR LIHCOM <> ? 
														) 
														OR LIPCOM <> ? 
													) 
													OR LIFCOM <> ? 
												) 
												OR LIFUN1 <> ? 
											) 
											OR LIQOWO <> ? 
										) 
										OR LIQTTR <> ? 
									) 
									OR LIQTIN <> ? 
								) 
								OR LIQONL <> ? 
							) 
							OR LIQTRI <> ? 
						) 
						OR LIQTRO <> ? 
					) 
					OR LIQTO1 <> ? 
				) 
				OR LIQTO2 <> ? 
			)
		)
	)
) 
ORDER BY LILOCN ASC  , LILOTN ASC
Trying to mix "Set Selection Group" with "Set Selection" leads to disaster. Anyone figured any tricks out?
 
Top