Why this isn't working?
Table.setrange("Reason for Archiving",'<>%1|<>%2|<>%3', Table."Reason for Archiving"::'Delete Manually',Table."Reason for Archiving"::'Delete Completed Document',Table."Reason for Archiving"::'Delete Manually without Posting');
Thank you!
0
Answers
Table.setfilter
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I get the error "a variable was expected"
http://forum.mibuso.com/discussion/14858/setrange-for-option-type-field
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
nothing works
Table."Reason for Archiving"::"Delete Manually"
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
ok, thank you, but what's the statement for saying "and" at the place of "|"?
Take a look at the help for SETFILTER Function (Record).
Use SETFILTER instead of SETRANGE..
eg.Table.SETFILTER("Reason for Archiving",'<>%1|<>%2|<>%3', Table."Reason for Archiving"::'Delete Manually',Table."Reason for Archiving"::'Delete Completed Document',Table."Reason for Archiving"::'Delete Manually without Posting');
MSDN Help:
SETRANGE: https://msdn.microsoft.com/en-us/library/dd355053.aspx
SETFILTER: https://msdn.microsoft.com/en-us/library/dd354919.aspx
In your situation, you want to set a filter on 3 different values, and therefore you must use SETFILTER. You cannot use SETRANGE in your situation.
I don't think you mean to use AND on a single field value, because there will not be any records that have all three values at the same time.
RIS Plus, LLC