November 29, 200421 yr I am starting to open my eyes to building preferences for my system... wow are the possibilities cool... I have a field in an accounts table called "group" I want to be able to assign each user to various groups: data entry manager director each with different privileges. Can I have the "group" field be a simple text field, and then if I want to assign someone to more than one group, just enter both group names delimited by a carriage return ?? I guess what I want to know is, can I easily test for Does a field = (or maybe contain) "y" when that field might contain something like this: g p x y z
November 29, 200421 yr Yes you can do a pattern count for the group: case(patterncount(group;"data entry")>0; result) Note that it is often better to put the Assigned Groups in a join table instead of a multi-key. This allows more flexibility in changing groups and reporting. This patterncount() then requires a dynamic value list of Assigned Groups. The test would then be: case( patterncount( ValueListItems( get( filename ); "Assigned Groups") "data entry") > 0 ; result )
November 29, 200421 yr If the value list is large, Position may be faster than PatternCount. Case( Position(
November 29, 200421 yr Author Ender -- thanks! and I think I understand the reason to go with a join table.. perhaps I'll try that though at first glance I don't understand how to create the value list of assignments.. (or.. i might not understand how it fits in relationally).. but if I have a sec.. I'll give it a try!! Transpower-- do you mean, instead of patterncount ?? thanks everyone
Create an account or sign in to comment