Simple search Method Problem

My First Method calls a show form in dialog. The form contains one global field with a combox. The combobox displays a list of 3 choices To Be Estimated, To Be Serviced and In Service.

application.showFormInDialog(forms.FlexInventoryWorkOrderQueueSelection,100,80,200,75,‘Select Queue’,false,false,true);

I have the following method attactched to the OnDataChange event on the above dialog form.

application.closeFormDialog()
forms.FlexQCInventoryWorkOrderListing.controller.show()

if (globals.Text12 = ‘To Be Estimated’)
{
forms.FlexQCInventoryWorkOrderListing.controller.find()
forms.FlexQCInventoryWorkOrderListing.service_status = globals.Text12
forms.FlexQCInventoryWorkOrderListing.classification = ‘Flexible Endoscope’
forms.FlexQCInventoryWorkOrderListing.controller.search()
globals.Number2 = forms.FlexQCInventoryWorkOrderListing.foundset.getSize()
}

else if (globals.Text12 = ‘In Service’)
{
forms.FlexQCInventoryWorkOrderListing.controller.find()
forms.FlexQCInventoryWorkOrderListing.service_status = globals.Text12
forms.FlexQCInventoryWorkOrderListing.classification = ‘Flexible Endoscope’
forms.FlexQCInventoryWorkOrderListing.controller.search()
globals.Number2 = forms.FlexQCInventoryWorkOrderListing.foundset.getSize()
}

else if (globals.Text12 = ‘To Be Serviced’)
{
forms.FlexQCInventoryWorkOrderListing.controller.find()
forms.FlexQCInventoryWorkOrderListing.service_status = globals.Text12
forms.FlexQCInventoryWorkOrderListing.classification = ‘Flexible Endoscope’
forms.FlexQCInventoryWorkOrderListing.controller.search()
globals.Number2 = forms.FlexQCInventoryWorkOrderListing.foundset.getSize()
}
globals.Text12 = null;

The problem is that the result set is always the same, it shows all the To Be Estimated records, not matter what I select in the combobox

On my original approach I was going to create 3 buttons on the navigation contoller each button would pull up the different work status queue instead of choosing from a combobox.

I had created three methods on the listing form

controller.find();
service_status = ‘In Service’
classification = ‘Flexible Endoscope’
controller.search(true,false);
globals.Number2 = databaseManager.getFoundSetCount(foundset);

controller.find();
service_status = ‘To Be Estimated’
classification = ‘Flexible Endoscope’
controller.search(true,false);
globals.Number2 = databaseManager.getFoundSetCount(foundset);

controller.find();
service_status = ‘To Be Serviced’
classification = ‘Flexible Endoscope’
controller.search(true,false);
globals.Number2 = databaseManager.getFoundSetCount(foundset);

These methods work fine if I run them from the listing:

So I then tried to call the above methods from the showformindialog combobox that I originally discusseed:

application.closeFormDialog()
forms.FlexQCInventoryWorkOrderListing.controller.show()

if (globals.Text12 = ‘To Be Estimated’)
{
forms.FlexQCInventoryWorkOrderListing.ShowToBeEstimatedOrders():wink:
}
else if (globals.Text12 = ‘In Service’)
{
forms.FlexQCInventoryWorkOrderListing.ShowInServiceWorkOrders():wink:
}
else if (globals.Text12 = ‘To Be Serviced’)
{
forms.FlexQCInventoryWorkOrderListing.ShowToBeServicedWorkOrders();
}
globals.Text12 = null;

This did not work either, I had the same result as my first approach. Obvioulsy, it has something to do with the showformindialog form with the global combobox. I know I am missing something simple. Any Ideas?

Thanks,
Erich

I figured it out ‘==’ not ‘=’ sheesh

DO NOT FEEL BAD! I have done it several times as well.

:D

Hot TIP: Look for “blue” equals in IFs.

Cheers,

Bob Cusick

Yes, this is one, that everyone falls into! :)
I am developing now almost 2 years and had yesterday the same issue again. It is that Filemaker-thinking again :x

Maybe a great feature, to do a detection of a single ‘=’ in an if-statement, and ask if this is right?