calculated field

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
dtessier
Posts: 8
Joined: 2019-09-29 14:15

calculated field

Post by dtessier » 2019-12-14 19:03

Hello,

I can't seem to get this to work. I have table tenants with field Rent I would like to do the following:

Rent * 12 / .4

I have attached a picture of the calculated field.

I hope I have included all of the required information and thanks in advance.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: calculated field

Post by jsetzer » 2019-12-14 19:11

Code: Select all

select (Rent * 12 / 0.4) from tenants where yourPkColumnName = '%ID%'
Replace yourPkColumnName and check letter casing of table name and column names.

Best
Jan
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: calculated field

Post by pbottcher » 2019-12-14 19:21

Hi,

why would you multiply with 12 and devide by .4? You could instead multiply by 30.

Also, there is not image attached to your post.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

dtessier
Posts: 8
Joined: 2019-09-29 14:15

Re: calculated field

Post by dtessier » 2019-12-14 20:38

Thanks for the quick reply. I have attached the picture and still doesn't seem to work for me.
appgini.jpg
appgini.jpg (192.09 KiB) Viewed 2239 times

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: calculated field

Post by jsetzer » 2019-12-14 20:45

What exactly does not work? Just in case it shows 0 as result, you should change from integer to double or decimal data type.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

dtessier
Posts: 8
Joined: 2019-09-29 14:15

Re: calculated field

Post by dtessier » 2019-12-15 13:22

appgini.jpg
it's not showing anything (gross income to qualify)

dtessier
Posts: 8
Joined: 2019-09-29 14:15

Re: calculated field

Post by dtessier » 2019-12-15 13:24

appgini.jpg
appgini.jpg (73.26 KiB) Viewed 2212 times

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: calculated field

Post by jsetzer » 2019-12-15 13:50

Are you sure both fields (Rent and the calculated field) are numeric?
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

dtessier
Posts: 8
Joined: 2019-09-29 14:15

Re: calculated field

Post by dtessier » 2019-12-15 15:29

Both fields are decimal

Post Reply