AnsweredAssumed Answered

User defined buttons

Question asked by aether on May 22, 2018
Latest reply on May 25, 2018 by jbrown

Hi All

I am working on a setup for a local non-profit and its been a few years since I built a Filemaker DB and I need some help with user defined buttons.

 

Lets say Its a sort of Point of Sale solution they need and they have an order screen with a portal listing the items on the order. Its easy enough for me to create buttons that add a specific frequently prdered product to the order. For example I might have 5 buttons on the order screen. Each button has its own script which adds a product to the order by going to the portal on the layout, and assigning a value to the product ID field. The rest of the info will then draw through from the related products table. Easy enough.

 

But it would be great if I could find a way for each button to go to the products table and find which product has been assigned to that ButtonID and add that product ID Instead of a fixed ID. The table ProductList has a field called ButtonID for example.

 

Then I could allow the user to define which buttons trigger which product by simply assigning values 1 through 5 in their products table.

 

Tables are:

Orders,

OrderDetails (related to above via OrderID)

ProductList (Related to OrderDetails by ProductID)

 

Or should i create some sort of intermediary table which has one record for each of the 5 available buttons and assign a product ID to each record?

So when you press button 5, it looks up the Buttons table and grabs the product ID thats been assigned to ButtonID (5)

 

Just not sure how to execute this in FM

 

Any help appreciated

Outcomes