Question for add a new ror action

Hello my dear Sir,

I have a question for about action do this for Data: Add a new row to another table by using values from this row.

I already have one action like that.

I have two tables, Items and Sale.

Items - In Items table I have 3 columns such as ID, Item, Price.

Sale - In Sale table I have 5 columns such as ID, Item, Price, Quantity and amount.

I already setting up behavior-event action-row selected is my action in deck view of for this data items table.

According to my action I clicked the one of the item in deck view. It's going to be new row for the sale data. And then I clicked the same item, it's also going to be new row.

My question start here.

I want to do the one row after I clicked the same item again and again.

I want to get the value of quantity column is total count of click the item in deck view of items table.

How to do that?

Please let me know.

Thanks

Kyaw Min Oo 

0 2 116
2 REPLIES 2

Hey friend,

when you execute the action on an item it doesn't know the Sale ID. It's not possible this way and bad database design.

You'll need at least three tables:

1. Sales (Main Table)
2. SalesItems (references Sales and Items)
3. Items (Main Table)


Cheers ๐Ÿ˜‰

Thanks for your suggestion.

I created new table you said. Sale items Table have 5 columns like ID, Items,Price, Quantity and Amount.

Let me know how to proceed?

Thanks 

Top Labels in this Space