Search within a range

For debugging, use a global variable filter_result.

Local variables are gone by the time you get around to asking for a Do It.

sorry, but i'm not understand.

You can't use local variables in the Do it debugger
Temporarily use global variables instead

Taifun

Thanks, it worked here.
image

Now I have another question, as this one now has two search buttons, how do I make it just have one button with the same search features?

image

I'm not sure if I understand your question?
What about deleting one of the Search buttons?

Taifun

If you need to save screen space, you could replace the multiple search buttons with a List Picker, and fill the List Picker with different search types.

Then you would need a big IF/THEN tree in the List Picker AfterPicking event, to see what type of search was requested, and to run the appropriate search type.

I understood

How can I fix this?

If I use the if/then block it doesn't work, and the way this works

What is search2 supposed to be searching for?

thread

But thread isn't what you use for tags in TinyDB, is it?

I'm going to leave it the way it is, with two buttons.

I created a second screen to search for nuts, but this error appears, the blocks are the same as on the SCREW_1 screen. I torqued the labels and text box because I made changes. Now I have this error when I search for a value that is in a range.


METRIC THREAD.aia (89.7 KB)

Read the error message

And check your data

This returns an empty string according to the error message

Taifun

Even if I change it, I don't get what I need.

I'm using tinydb1 for the BOLT_1 screen and tinydb2 for the Nut screen.

The nut screen has to work the same as the PARAFUSO_1 screen, but it presents this error and I couldn't see where I went wrong.
the range/filter search part is not working

I don't understand why the filter is returning empty, if tinyDB2 has results

And what's that?


Taifun

How do I erase the empty ones without erasing the rest that has value?

I already got it

I see you have added a new screen for a different part type, with other attributes.

So now you do nuts and bolts in 2 screens in 2 TinyDBs.

How many more part types do you plan to track? Washers? Wood screws? plumbing fittings?

Be aware that there's a 10 screen limit.

You might need to refactor your data storage design, and work off schemas describing the attributes of each part type.