Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Generate Report?

Featured Replies

Im not sure if this is where thsi question should be posted but I am sorta stuck. I have no formal FM training and i am trying to do something here and I havent been able to figure it out.

I have a simple inventory database that I made. I have a field called "In Stock" that shows how many items of a certain product I have in stock.

I want to always have so many of each item in stock.. I want a minimum number of items and a maximum number. when the items reach the minimum I want to order more of those items.

so what I have done is made two new fields "Min" and "Max" Min and Max will be filled it with preset numbers. They will vary from item to item. What I wouild like to do is to be able to make a button that when I press it, will print all the products out that have reached or gone below the min so I have a list of items I must re-order. Of course each product is a record. and i have about 250 records. Im so lost. please help?

Create a calculation

flag_below_min = if( on_stock < min ; 1 )

Now create a script which searches for ones in this field and shows a list.

-jens

  • Author

what if the min is different for each record? I mean min could be 2.. it could be 3 4 5 or even 12... some stuff i wanna keep more in stock than others.

where is the problem? min can be different for each record as well as on_stock. if you search those ones where the individual difference is negative, everything is fine!

jens

  • Author

i guess I know a lot less than I realized because you are speaking greek to me lol


+-----+-----+-----+-----+

|stock| min | calc| flag|

+-----+-----+-----+-----+

| 120 | 100 | 20  |  0  |

| 120 | 110 | 10  |  0  |

| 130 | 200 |-70  |  1  |

| 200 |  90 |110  |  0  |

| 250 | 300 |-50  |  1  |

+-----+-----+-----+-----+

calc = stock - min

flag = if ( calc < 0 ; 1 )

Does this help?

Jens

You could just make a Unstored Calculation Field, we'll name it Product status. Make this the calculation.

Case (GetAsNumber(In Stock) < GetAsNumber(Min);"Order" ;GetAsNumber(In Stock) > GetAsNumber(Max);"Too Many" ; "Good" )

Then you can search quickly for the items you need to order if they are below what you designate as the minimum or above the maximum.

Michael

  • Author

thankyou for the diagram jenns.. I understand better now.

my next question is this though.. again sorry for being such a newb to fmp... but... the calculation... would I associate that to a button? I guess im not sure where to enter the calculation at... do I associate it with a field? a button? somewhere else? or am I not making any sense? sorry for so many questions.

  • Author

Ive got this If ${canton-group_inv}:o:In Stock: ≤ ${canton-group_inv}::Min but I dont know how to put the "then"

I want it to be

If ${canton-group_inv}::In Stock: ≤ ${canton-group_inv}::Min then Order = 1

but i cant see how to add the "then Order = 1"

Edited by Guest

  • Author

Ok i think Ive got a good start here now... however with what I am doing.. I need to make my field "order" have its data auto entered... I cant figure this out... I cant see how I can make the auto entered data be determined by a script.. and when I try to do it by a calculation its not working for me.

I have a script written that will find all the records where order = 1 but i just cant figure out how to get order to =1 automatically based on what the field "Min" is. Id like the data entered in "Order" to be a 1 if InStock <= to Min.

god Im getting more lost the deeper I dig and the further i get lol

I tried to attach a sample file but it won't(Hangs after I choose the file) upload for some reason. :o You can do it via a calculation. with a single field no scripts. I moved away from populating fields with "1" for such things as this.

Make a new field named Product Status. As soon as you have made the field on the right hand side click in the dropdown and make it a calculation and in the calculation window click on Storage options and make it unstored. Put this calculation in.

Case (GetAsNumber(your in stock field) < GetAsNumber(your min stock field);"Order" ;GetAsNumber(your in stock field) > GetAsNumber(your max stock field);"Too Many" ; "Good" )

This field will automatically Show "Good" if your stock is within the boundaries you designate with your Max field and your Minimum field. If you have more than the Max it will say "Too Many". If it is below your Minimum field it will say "Order"

I think you are just making it a little harder then need be, which filemaker tends to make us do sometimes.

Michael

  • Author

Thank you! that worked like a charm!

I see what you mean too.. I definitely was making it much harder than it had to be. :o

Thank you once again :

Glad I could help. :o

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.