Subject: RE: Can the SELECT SQL statement be used for a table stored in a notes doc?
Hi Andre,
Thank you for your post! Please see my answers after the dash lines (–).
Some things are still unclear. You say you have a table. Is this a reference table which is the same for all documents, or is it associated with the document, so each document could have a different one?
– This would be a reference table which is the same for all documents
Do you get to choose how the table is stored? Why did you say it’s an HTML table?
– I get to choose how it is stored. At the moment it is in HTML, but I am happy to place it in a rich text field or in any other format if a solution is easier that way
Even the arrangement of the table can change
At the moment it is like this
X A B C
A X Y N
B N X N
C Y N X
But it can be like this as well
A B Y
A C N
B A N
B C N
C A Y
C B N
In this arrangement the first two columns would be checked against user input, and as a result the third column would be the output.
Of course it’s possible to write code that does the same with a table stored in a rich text field on the document you’re editing. But exactly what code will do this, depends on the details of what you’re trying to do. It seems the part you’re having trouble with, is retrieving the value from the table. Let’s concentrate on that – please don’t get distracted into telling us what you’re going to do with the value once you’ve got it.
– Yes, my problem lies with retreiving data from the table. Would I need to create documents for each row, and then build a view for these docs, so I can do a lookup on this view?
For this to work I would need to assign a key to the columns, but is there a simpler way? Like a table lookup in excel?