Multiplying values from two Columns into a 3rd column

Discussion forum about all things Team Developer 5.x and 6.x
Headcold
United States of America
Posts: 25
Joined: 05 Mar 2018, 16:01
Location: USA

Multiplying values from two Columns into a 3rd column

Post by Headcold » 26 Sep 2019, 16:37

So I am curious if someone can walk me through how I would go about multiplying values from two columns and out putting the value to a 3rd column.

Using the attached photo. The user for example would manually enter the quantity and the Unit price and the total would be figure out automatically.
Maybe someone can point me in right direction. Thank you

sample.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by Headcold on 27 Sep 2019, 13:51, edited 1 time in total.

monchotgu
Honduras
Posts: 72
Joined: 24 Apr 2017, 02:55
Location: Honduras

Re: Multiplying values from two Columns into a 3rd column

Post by monchotgu » 26 Sep 2019, 18:43

You can capture the SAM_AnyEdit message in the columns where the user input the values and do the multiplication there

Example
ON SAM_AnyEdit
Set tbl1.colTotal=tbl1.colUnit*tbl1.colPrice

Headcold
United States of America
Posts: 25
Joined: 05 Mar 2018, 16:01
Location: USA

Re: Multiplying values from two Columns into a 3rd column

Post by Headcold » 27 Sep 2019, 10:51

Thanks for the help. I tried this but continue to get a numeric required output error. Sorry I am fairly new to TM

Giorgio Bravi
Italy
Posts: 59
Joined: 09 Mar 2017, 18:08
Location: Bergamo, Italy

Re: Multiplying values from two Columns into a 3rd column

Post by Giorgio Bravi » 27 Sep 2019, 11:01

Check if colums are defined as numeric and/or if there is a NULL value i.e. with SalIsValidNumber ( hWndCol ) before doing the calculation

Headcold
United States of America
Posts: 25
Joined: 05 Mar 2018, 16:01
Location: USA

Re: Multiplying values from two Columns into a 3rd column

Post by Headcold » 27 Sep 2019, 11:41

Thanks,one of the columns was not set as number

Return to “General Discussion”

Who is online

Users browsing this forum: [Bing], [Ccbot] and 0 guests