Hello All
Thanks for the reply Martin
I did use the value of the combo box directly and was able to achieve what I wanted to.
Now I am trying something different, suppose I want to search >8 && <23 (from all the 4 combo boxes)
I have 4 combo boxes which are as follows:
combo box 1 - select a criteria (>, <,>=, <=) combo box 2 - Hours (1-100)
combo box 3 - select a criteria (>, <,>=, <=) combo box 4 - Hours (1-100) Search Button
Following methods I tried
Method #1 (click on Search Button after selecting all the necessary combo boxes)
void clicked()
{
FIMMSummarizationTable summaryTable; str summaryProjId; str qrySummaryProjId;
string255 criteriaCombo1;
string255 criteriaCombo2;
int hoursTxt1, hoursTxt2;
Query query; QueryRun queryRun;
hoursTxt1 = str2int(FIMMHours1ComboBox.valueStr());
hoursTxt2 = str2int(FIMMHours2ComboBox.valueStr());
while select * from summaryTable
where summaryTable.FIMMCourseProjId like projId + ‘*’ &&
summaryTable.FIMMWeeklyHours > hoursTxt1 &&
summaryTable.FIMMWeeklyHours < hoursTxt2
{
summaryProjId += summaryTable.FIMMCourseProjId + ‘,’;
}
qrysummaryProjId = subStr(summaryProjId,1,strLen(summaryProjId)-1);
qbr2.value(qrysummaryProjId);
super();
}
init for method 1
qbr2 = this.query().dataSourceName(‘FIMMSummarizationTable’).addRange(fieldNum(FIMMSummarizationTable,FIMMWeeklyHours));
Method # 2
void clicked()
{
hoursTxt1 = str2int(FIMMHours1ComboBox.valueStr());
hoursTxt2 = str2int(FIMMHours2ComboBox.valueStr());
qbr2.value(strFmt(’((%1 > %2) && ((%1 < %3)))’,
fieldStr(FIMMSummarizationTable,FIMMWeeklyHours),
any2int(hoursTxt1),
any2int(hoursTxt2)));
super();
}
init for method 2
qbr2 = FIMMSummarizationTable_ds.query().dataSourceName(‘FIMMSummarizationTable’).addRange(fieldNum(FIMMSummarizationTable,FIMMWeeklyHours));
Please advice
Thanks,
Shankar Iyer