Two Dimensional Tabel Look-up For Cms System

We need 2 almost identical functions for our homepage.

The first function, needs an input of 4 digits from a field on the viewed page, which the viewer provides by entering his information there.

This entry is then searched for in the first column of an underlaying two dimensional look up table, consisting of 1252 Rows times 3 columns, residing on the server (NOT part of the viewed page).

When a match is found, the function looks up the relating entries in the same row and use them according to the following description:

The second column contains a name of a town, which is then going to be displayed in a seperate field on the page, next to the input.

The third column contains a number, which is then used in a simple mathematical formula, on fixed entries in fields of a vissible table on the viewed homepage itself. The formula could be: fixed value in the 1st column of a displayed table / 1000 * FUNC:Irad (Irad being the output from the lookup function).

The table must reside on the server for the homepage. We can upload such files at will, under the current CMS system, as we upload pictures and/or pdf files. The name of the file being the same as we call the function that it refers to ie: Irad (suffix “.dat” or “.tbl” or whatever)

Town: LLookup(Entry;Irad.A1:A1252;2)
Irad: LLookup(Entry;Irad.A1:A1252;3)

The function List-Lookup (in Open Office Calc) finds the row where the Entry match the content in the first column, and then looks up in the same row the referred column (ie: 2 or 3) as described above.

The underlaying table could be either a comma file, a calc sheet or a database, whichever is preferred by the programmer.

We should ofcourse be able to use this function call for every entry in the vissible table that we want to, simply by calling it’s name as part of the formula for that entry.

The actual programmed functionality must not be present with the viewed page, but must reside on the server, so it cannot be copied by a viewer. Therefore it might presumeably be necessary to have a virtual button on the viewed page that says “Calculate”

The next function is basically similar, but requires the user to enter two values.

Angle: 1-360
Tilt : 1-90

The underlaying table for this function then contains 360 rows of each 90 columns, and is called: FUNC:Coeff

Angle can be used directly to access the relevant row, and Tilt used to enter the correct column of that row, for the resulting value.

The result is then again used in a simple formula on each entry of the last column in a vissible table, by just calling the function name: FUNC:Coeff x entry

It would be nice, if the fomula could just be entered as shown above, in the respective field of the table.

If there is any additional questions please don’t hesitate to ask.

We want the solution to be as generic as possible, so the same concepts can be used in various contexts.

It seems to me a fairly simple programmingtask for a skilled programmer, either in Javascript or whatever.

Kind regards
Steen

Leave a Reply

Your email address will not be published. Required fields are marked *