13 Replies Latest reply on Jul 10, 2009 8:30 AM by LaRetta_1

# pop up Alarm

### Title

pop up Alarm

### Post

Hi all members of the forum,

These are some of the contents of my dataBase

Product Name

Expiration Date

Quantity Used

Quantity Balance

On the quantity balance I made a calculation "Quantity received - Quantity Used" and my problem is I would like to make a script for a pop up reminder that will remind me if the quantity balance of any material reached to a certain level (10% level) based from the Quantity received.

I have a script for the reminder based from a birthdate reminder which I have read.

1. Enter find mode []

2. Set Field[Reorder:: Quantity Balanced: If(Reorder::Quantity Balanced {lessthan or equal   to} .1*Reorder::Quantity Received;""]

3. Performe Find[]

4. Set variable[\$found;Value:Get( FoundCount )]

5. If [\$found>0]

6. Set variable [\$counter; value:1]

7. Loop

8. Set Variable[\$names; Value:\$names & GetNthRecord(Reorder:

9. Exit Loop If(\$counter = \$found]

10. Set Variable [\$Counter; value:\$counter + 1]

11. End Loop

12. Show Custom Dialog["Attention! Reorder Products"; "Products Need to Reorder:¶" & \$names]

13. End If

Kindly help me organize the script based from my data.

Thank you very much.

Thong

• ###### 1. Re: pop up Alarm

thongLoreto:

Thank you for your post.

When you enter Find mode, the field is generally looking for static information; not a calculation.

There are a few ways to accomplish this.

Create a Calculation field, "LEVEL", with the formula = Quantity Balance / Quantity Received

Your script could then be written:

Set Error Capture [On]

Enter Find Mode []

Set Field [ LEVEL ; "<=0.1" ]

Perform Find []

If [ Get ( FoundCount ) = 0 ]

Exit Script

End If

Go to Record/Request/Page [ First ]

Loop

Set Variable ( \$names ; \$names & Product Name & "¶" ]

Go to Record/Request/Page [ Next ; Exit after last ]

End Loop

Show Custom Dialog [ "Attention! Reorder Products" ; "Products Need to Reorder:¶" & \$names ]

-------------

If you don't want to create a "LEVEL" field, then you can write a script to evaluate each record:

Set Variable [ \$names ; "" ]

Go to Record/Request/Page [ First ]

Loop

If [ Quantity Balanced / Quantity Receive <= 0.1 ]

Set Variable [ \$names ; \$names & Product Name & "¶" ]

End If

Go to Record/Request/Page [ Next ; Exit after Last ]

End Loop

If [ \$names <> "" ]

Show Custom Dialog [ "Attention! Reorder Products" ; "Products Need to Reorder:¶" & \$names ]

End If

--------------

Please let me know if you need clarification for any of the above steps.

TSGal
FileMaker, Inc.
• ###### 2. Re: pop up Alarm

FYI Note:

This is a double-post.

The active thread can be found at:

pop up alarm in reorder level

It is marked "Solved" but it is not solved at this time.

Enjoy the day!

• ###### 3. Re: pop up Alarm

Hi Ninja,

I'm Sorry, because yesterday I accidentally clicked the solution buttong without trying your suggestion.

Thank you very much.

• ###### 4. Re: pop up Alarm

thongLoreto,  No worries.

You can remove "solved" status if you find it important to do so by using the "Options" dropdown on the top right of your posts.

I was just trying to let folks know which thread to follow.  Perhaps it will help someone else in the future when they look back on the threads.

Enjoy the day!

• ###### 5. Re: pop up Alarm

Hi Ninja,

Thank you very much for your understanding...

• ###### 6. Re: pop up Alarm

Hi TSGal

Set Variable [ \$names ; "" ]

Go to Record/Request/Page [ First ]

Loop If [ Quantity Balanced / Quantity Receive <= 0.1 ]

Set Variable [ \$names ; \$names & Product Name & "¶" ]

End If

Go to Record/Request/Page [ Next ; Exit after Last ]

End Loop

If [ \$names <> "" ]

Show Custom Dialog [ "Attention! Reorder Products" ; "Products Need to Reorder:¶" & \$names ] End If

I tried this script but It only pop up 1 products having zero balance. It doesnt give me all the products below 10% level. but the first 1 it works.

Thank you very much and More power to all members of the forum.

• ###### 7. Re: pop up Alarm

What was your found set when you ran the script?

To get all such records, add a Show all records at the start of your script.

• ###### 8. Re: pop up Alarm
when I ran the script it shows only 1 record (1 Product Having Zero Balance). I rerun again the script with your suggestion (Add a Show all records) but still the same It shows only 1 product having zero balance but its a different product having zero balance.
• ###### 9. Re: pop up Alarm

when I ran the script it shows only 1 record (1 Product Having Zero Balance). I rerun again the script with your suggestion (Add a Show all records) but still the same It shows only 1 product having zero balance but its a different product having zero balance.

When I clicked the list view it shows all the list of all products in my records.

• ###### 10. Re: pop up Alarm
What do you see in the custom dialog?
• ###### 11. Re: pop up Alarm

ThongLoreto, you haven't provided your entire Find script (there is no Enter Find Mode nor a Perform Find portion).  Many people accidently leave a find request in either place (do either of these steps indicate RESTORE?).  If so, this will mess up your find.

I might also suspect that the Set Variable [] does not look like

Set Variable [ \$names ; \$names & Invoice::Customer Name & "¶" ] but rather looks like

Set Variable [ \$names ; Invoice::Customer Name & "¶"

... just a few more ideas to check. :smileyhappy:

• ###### 12. Re: pop up Alarm

Hi guys I'm here again, I uploaded my Dbase at this link for your review and suggestions "rapidshare.com/files/254205364/MaterialLog.fp7.html". I tried all your suggestions but it seems it now working for my Dbase. Hope you will not tired answering my query.

thank you very much and more power

• ###### 13. Re: pop up Alarm

Two errors on your Reorder 2 script:

Your Set Variable[] step:  You forgot to put the & ¶ to the end.

You had:    \$names & Reorder:: Product Name

Should be:  \$names & Reorder:: Product Name & ¶

Then your Custom Dialog needs the & \$names added to it:

You had:    "Product Need to Reorder"

Should be:  "Product Need to Reorder:¶" & \$names