Jump to content
Sign in to follow this  
sicSRT8

Radio button setup for conditions

Recommended Posts

I wasnt able to find this answer so here goes.

I want to add a radio button to my inventory table for each item to say defective "yes" or "no"

I am able to create it in the field but want to be able to set conditions later that if yes is selected then it will bar it from be available in a related drop down as active material.

These items are scanned in via barcode into the inventory and would also like them to be set to no automatically.

What is the best way to do this so I am able to use in calc's?

Share this post


Link to post
Share on other sites

I much prefer 1/empty (or 1/0) to Yes/No. Then all you need is a single checkbox rather than a pair of radio buttons.

Add a relationship criteria ≠1 (does not equal 1) and that takes care of your value list.

Since you'd only enter "1" when it's defective, no need to auto-enter anything for new item scans.

Does that make sense?

Share this post


Link to post
Share on other sites

I think so but need more guidance as to how to set it up. Im not that great at FM.

Set a field up called "Defective"

Use check box with Yes/No as varibles?

Share this post


Link to post
Share on other sites

Create a value list called SELECT and only put a 1 in it.

Then attach that value list to your Defective field formatted as a checkbox. Make the size of the checkbox 18 px x 18 px or so (same width as height), so that the 1 next to the checkbox disappears.

Type the word Defective (using the text tool) next to the checkbox.

Now you can use this SELECT value list for many things, attaching it to different fields and just changing the text you type next to it. When you 'check' the box, it will put the X in the checkbox and put a 1 in the field.

Edited by Guest

Share this post


Link to post
Share on other sites

I agree with Tom.

Create a value list with a value of 1, lets call it "flag".

Now on your Defective field, just use use a checkbox with this value list "flag". Now whenever a record is created, since it will be empty, it will represent a working one. You can resize the field to not display the 1 next to it.

Edit: LaRetta beat me to it.

Edited by Guest

Share this post


Link to post
Share on other sites

Ok got the check box set to 1.

But if my current calc to grab avail inventory items for a particular field is

Roll_ID & "F"

I would I add (not equal)1?

Basically if the roll ID# has an F in it, it is only allow to appear in this field. So Rolls that have F but have a 1 checked don't show up is what Im trying to achieve then.

Would I use

Roll_ID & "F" & (not Equal)1

Sorry I dont know the character to actually make the not equal sign

Edited by Guest

Share this post


Link to post
Share on other sites

So Rolls that have F but have a 1 checked don't show up is what Im trying to achieve then.

Roll_ID & "F" & (not Equal)1

If I understand correctly, this will work:

PatternCount ( Roll_ID ; "F" ) and not Defective

... which means ... if there is an "F" in the Roll_ID field AND if that Defective field does NOT have a 1 in it (referenced by saying 'not Defective' which is a boolean question), then the inventory should count.

UPDATE: But what if the RollID DOESN'T have an "F" in it and isn't Defective? The current solution I gave you will NOT count the record in inventory either.

Edited by Guest
Added update

Share this post


Link to post
Share on other sites

I think i just tripped over my own feet. What if I use a value list to pull up the available lot numbers based on a related calc Roll_ID & "F"?

I tried adding

PatternCount ( Roll_ID ; "F" ) and not Defective

Which is PatternCount ( Roll_ID ; "F" ) and not Inventory::defective

But now I get no choices at all which tells me I am doing it wrong.

Share this post


Link to post
Share on other sites

I get the check box but not the condition. I have a field set to drop down a value list from a related table based off a calc of anything with "F".

When I add the not equal to 1 into the calc it returns nothing in the drop down but when I take it out I get my list however I also get the items that I have marked with the check box.

Am I putting the calc in the wrong field?

Share this post


Link to post
Share on other sites

Am I putting the calc in the wrong field?

I have no idea what you are even doing; you have totally lost me. I knew I shouldn't try to give you a calculation based upon your words alone when your words didn't make sense to me. If you are attempting to filter down a value list of inventory items which only have an F in the Roll_ID and are not defective, then create this calculation in your Inventory table:

Case ( PatternCount ( Roll_ID ; "F" ) and not Defective ; Roll_ID )

This calculation field should be used in your relationship instead. Maybe others can join in or a simple file of what you have and what you want would also help. :wink2:

Edited by Guest
Removed a few sentences

Share this post


Link to post
Share on other sites

Sorry sometimes I forget people cant read my thoughts or see whats in my head. I was more looking for where I would input the calc but that makes since. If i use a relationship based on the "F" is should actually be based on "F" not equal to 1

I will try your case calc. Thanks for trying to answer my question. If it doesn't work Ill make a sample of what im doing or at least what I am attempting to do.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.