sergiojg Posted June 6, 2011 Posted June 6, 2011 hi guys, i'm using fm11pro and i have my inventory database, I would love to have an check mark for the sold items and dissapear from the available items. i will include a picture of my base, can somebody tell me how i have to do to make item dessapear if i mark SOLD ? thanks in advance.
nesor Posted June 8, 2011 Posted June 8, 2011 Add field (of you don't have already) "Sold" to products table. Create a value list 1 with one value in it: 1 Add the Sold field to your product layout and set it up to use a checkbox. Set this checkbox to use values from value list 1. You can change the font color of the checkbox to make the number "1" disappear. Now you have a checkbox and when it's checked, the value 1 will populate in the Sold field. Method 1: Create a script to constrain your found set to omit records where Products:sold=1. Attach the script as a trigger to your checkbox. If you set it to fire when the Sale field is modified (i.e. user check or unchecks the box), you can have the record omitted from view once Sold is checked. You might prefer changing the trigger to fire when the Sold field is exited. Method 2: Add a global field to your products table gOne. Create a startup script that sets Products:gOne to 1. Create a new table occurrence (in your relationship graph) labeled "Available Products" or similar The relationship should be Products:Sold ≠ Available_Products:gOne You can create a layout based on the Available_Products table occurrence.
sergiojg Posted June 8, 2011 Author Posted June 8, 2011 i have another problem, i added a button to show only unsold items. i made a script: if inventory::vendido = 1 Omit multiple records end if when i press the button only omit one record. help me please.
nesor Posted June 9, 2011 Posted June 9, 2011 You shouldn't need an IF statement and you don't need Omit multiple records for this. Use Constrain Found Set, check the box for "Specify find requests". The Action drop down menu should be set to "Omit Records". The criteria should be Inventory::Sold = 1 When this script runs, it should leave in your current set of records only those that are NOT sold.
Recommended Posts
This topic is 4976 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now