Calculating from Table Entries

Solved a problem in an elegant manner and want to show off your code? Know a hard-to-find feature? Post it here for the benefit of others. Questions don't belong here.
Posts: 5
Joined: Thu Oct 19, 2017 11:19 am
Has thanked: 3 times

Calculating from Table Entries

Post by SpotliteSteve »


I am very new to Proclaim, but enjoying every minute of so far (probably because I haven't hit any of the real frustrating areas yet).

I have created two separate Tables, each containing different insurance Reserve figures. I need to be able to find the latest lines in each table and add these two figures together to put into separate field.

Is this possible, and can anyone assist me on the Maths code required?

Thanks in anticipation.....

Posts: 462
Joined: Fri Jun 15, 2012 12:44 pm
Has thanked: 15 times
Been thanked: 46 times

Re: Calculating from Table Entries

Post by revellbikes »

Welcome to the forum.

It certainly is possible, the following commands are detailed in the 3.3 Release Notes and probably in the latest Tech 3 manuals.

• TABLEFIRST - select the first record in a table
• TABLELAST - select the last record
• TABLENEXT - select the next record
• TABLEPREVIOUS – select the previous record
• TABLEGETCURRENT - to get the current record line
• TABLESETCURRENT - to set the current record number
• TABLECOUNT - gives you the total number of records in a table
• TABLESELECTCOUNT - gives you the total number of selected records in a table
• TABLERESET - is used to clear the selection of records from a table
• TABLESELECT - allows record selection
• TABLEREFRESHALL – Refreshes the table on screen
• TABLEREFRESHCURRENT – Refreshes the current line in the table
• TABLEREFRESHSELECTED – Refreshes the selected table items
• TABLETRUECOUNT – for Eclipse use only

So you will need to use either TABLEFIRST or TABLELAST to select the most recent or oldest record in the table depending on your requirement. Notice you can also select through the lines useing TABLENEXT / PREVIOUS.

Store you values as variables and add them together, giving you what you require I think?