hi all. how to filtering field from boolean to option type
Group is option type (Male,Female,Both)
like for example
Table A
No. Name Group
1 Jon Male
2 Jack Both
3 Kim Female
Table B
No. Name Group
1 Jon Male
2 Kim Female
i want to filter table A group using table B group
in table C it should be only group Male & Female only
how is it?
my code
IF CLE.“Male” = TRUE THEN
TableB.SETRANGE(TableB.“Group”,TableB.“Group”::Male);
IF CLE.“Female” = TRUE THEN
TableB.SETRANGE(TableB.“Group”,TableB.“Group”::Female);
IF CLE.“Both” = TRUE THEN
TableB.SETRANGE(TableB.“Group”,TableB.“Group”::Both);
In above TRUE (Instead of CLE.“Male” = TRUE,just use CLE.“Male”) is not required, but that should not create problem/ error. Is CLE your table C? Where is the use of Table A in this code?
REPEAT TableC.RESET; TableC.SETRANGE(“Document No.”, DtldCustLedgEntry.“Document No.”); TableC.SETRANGE(TableC.Type,TableC.Type::Item); IF CLE.“Male” = TRUE THEN TableC.SETRANGE(TableC.“Group”,TableC.“Matrix Group”::Male) ELSE IF CLE.“Female” = TRUE THEN TableC.SETRANGE(TableC.“Group”,TableC.“Matrix Group”::Female) ELSE IF CLE.“Both” = TRUE THEN TableC.SETRANGE(TableC.“Group”,TableC.“Matrix Group”::Both) IF TableC.FIND(’-’) THEN InsertData; UNTIL TableC.NEXT =0;