Triggers
I am very new to ninox. I am using the Inveotory Database and customizing it for us. I am trying to create a static filed that pulls in the cost and price of an item at the time of the invoice. I tried to do my own research first and I came across this in the manual which is exactly what I am looking for but I need it to work on two fields at the same time.
A trigger on the table reference Article can do that work automatically: Just define “Price := Article.Price” to copy the price, each time the article is assigned / changed.
In the trigger I entered: ('Cost Per Unit' := Article.'Purchase Price Per Unit') and ('Price Per Unit' := Article.'Selling Price')
BUT only one field works at a time! I can get Cost Per Unit to update, or price per unit but I can not get them both to update. I'm sure this is the most basic question ever but any help would be greatly appriciated.
1 reply
- 
  Hi Hill Top Tire - Try something like: 'Cost Per Unit' := Article.'Purchase Price Per Unit'; 'Price Per Unit' := Article.'Selling Price' The semi-colon is the code to end the function. Or you can just put the new function on a new line and Ninox will put in the semi-colon for you. The "and" is not used in this way. Good luck and let us know how it goes. 
Content aside
- 3 yrs agoLast active
- 1Replies
- 204Views
