Hi All Can we filter a option string or what are the alternatives for that? Thanx & regards Rajan
Do you mean Table.SETRANGE(OptionField,Table.OptionField::OptionA)? Please elaborate.
Suppose i have a option string of 1 to 10 and i want to filtered out 5 to 8 values and it should show only those filtered values.can we do it? it’s very urgent. Thanx and regards Rajan
quote:
Originally posted by nelson
Do you mean Table.SETRANGE(OptionField,Table.OptionField::OptionA)? Please elaborate.
Then you mean Table.SETRANGE(OptionField,Table.OptionField::5,Table.OptionField::8) which will give you all records where the value for this field is 5, 6, 7 or 8. Read the online help for the SETRANGE function.
I don’t want to filter the records of table. what i want is filtering of option string. Example: I have two option strings one contans value from (A-E) and another contains values from (1-5). Now what i want is if i select A from the first string then the other option string should only show 1 and not the other values. And if i select 2 then it should display B not the other values. thanx Rajan
quote:
Originally posted by nelson
Then you mean Table.SETRANGE(OptionField,Table.OptionField::5,Table.OptionField::8) which will give you all records where the value for this field is 5, 6, 7 or 8. Read the online help for the SETRANGE function.
I’m sorry, I completely fail to understand your point or what you are trying to do. You want to filter, but not on a record?! You want to use 2 option variables, but they mean exactly the same?! Last attempt: OptionStringNo2 := OptionStringNo1 ?!? could this be it? I’m sorry.
Hey Rajan, keep in mind, that the option string is just a help for the programmers. Internaly the option string is simply stored as an integer, where it begins with 0. That means if you have an option string “OptionString1” with values “text1”, “text2” and “text3” internaly it is simply stored as 0,1 and 2. If you have another optionstring with “X1”, “X2” and “X3” this is stored again as 0,1 and 2 Instead of filtering like sampletable.SETRANGE(Optionfield1, Optionfield1::“Text1”) you could filter sampletable.SETRANGE(Optionfield1, 0) (where 1 assume “Text1” is the first entry of the optionstring) For filtering the correct optionstring you could use X := sampletable.OptionString1::“Text1” sampletable2.SETRANGE(Optionstring2, X); But, in fact, this is not very fine, because where should another programmer know what you mean ?!.. however, hope it helps to solve your problem