Please Help - Calculated Field
Posted: 2022-01-13 02:32
I am a very recent AppGini user. I have creeted a fairly simple AppGini "client application" and have spent quite a bit of time on researching my issue and making trials, but without any success. The problem seems fairly simple (from a logical viewpoint), but as I have no SQL experience I just can’t solve the problem. I have read the post: https://bigprof.com/appgini/help/advanc ... lculations which seems to refer to the issue that I am having, but I just can't work out the actual SQL "code" that I need to use. I was hoping that someone may be able to help.
The issue is as follows:
DATABASE = CLIENTS
TABLES = MASTER and DETAILS
FIELDS (MASTER) = MasterID, Name, ChargeRate
FIELDS (DETAILS) = DetailsID, Date, Name, JobDetails, JobDuration, ChargeRate, Fee
The process that I want for each record that I add (or modify) in the DETAILS table is as follows:
• Enter Date
• Lookup Name in MASTER table
• Enter JobDetails
• Enter JobDuration
• Lookup ChargeRate in MASTER table
• Calculate Fee and store it in Fee field. This calculation should work by multiplying the JobDuration by the ChargeRate
At the moment, everything works EXCEPT for the Fee calculation which is incorrectly multiplying the JobDuration by the MasterID field (rather than
the value in the ChargeRate field). I know that this is due to my SQL statement being incorrect for the Fee field, but I have absolutely no idea
regarding the proper SQL statement to place there,
I would be extremely grateful if someone would be able to provide the correct SQL statement to me for the Fee field.
Many thanks in advance.
The issue is as follows:
DATABASE = CLIENTS
TABLES = MASTER and DETAILS
FIELDS (MASTER) = MasterID, Name, ChargeRate
FIELDS (DETAILS) = DetailsID, Date, Name, JobDetails, JobDuration, ChargeRate, Fee
The process that I want for each record that I add (or modify) in the DETAILS table is as follows:
• Enter Date
• Lookup Name in MASTER table
• Enter JobDetails
• Enter JobDuration
• Lookup ChargeRate in MASTER table
• Calculate Fee and store it in Fee field. This calculation should work by multiplying the JobDuration by the ChargeRate
At the moment, everything works EXCEPT for the Fee calculation which is incorrectly multiplying the JobDuration by the MasterID field (rather than
the value in the ChargeRate field). I know that this is due to my SQL statement being incorrect for the Fee field, but I have absolutely no idea
regarding the proper SQL statement to place there,
I would be extremely grateful if someone would be able to provide the correct SQL statement to me for the Fee field.
Many thanks in advance.