Question:
I need to make a Qilan-generated list clickable on the web page. That is, have each item a link to a new output from the (Helix) database. How do I do this? That is, how do I make the HREF talk back to Qilan to look up a specific record? I can include an ID# in the HREF, but having Qilan use that number is unclear to me.
Answer:
First off, an HREF is an attribute of a <A> tag. It's function, when clicked, is to link to another page or perform a FORM action. In your case, you want to perform a FORM action.
The HREF syntax to do this is as follows:
[Form_Name]?[field1_name]=[field1_value]&[field2_name]=[field2_value]
The question mark (?) instructs the webserver to accept what follows as a GET request. From a user's point of view, clicking the link performs the same function as clicking a submit button.
Now, back to Qilan. (Please note that some of the tags in the example are being omitted for clarity.)
QOGTABLE fields record_id
client_name
-- The fields are framework fields used to receive the data from Helix.
TR
TD
A href link_abacus
QVALUE record_id
TD
QVALUE client_name
The html form you will want to 'link to' is called, "Helix_Info"
The abacus, 'link_abacus' is constructed as follows:
("Helix_Info" fb "?" fb by "record_id" fb by [record_id])
The abbreviation, 'fb' is the abacus operator, followed by. Note that the name of the field is typed, but the value, is the field icon. The quotes are added by Qilan and are not typed by you.
When you click on the record_id, the webserver will request the form, "Helix_Info" and value any field named, "record_id".
Now, lets' move to the form, "Helix_Info"...
QOGPROCESS name get_client_record
QOGENTRY fields record_id
QOGTABLE fields client_name
client_address
client_balance
view client_info
What we are doing is passing the value of 'record_id' back to Helix. Within your collection, you will construct a query that uses 'record_id' for the view, "client_info". If you want to format the return as a table, then use QOGTABLE, otherwise, use QOGFIND and you can manipulate the formatting any way you need to.
I recommend you use QOGPROCESS where an entry and retrieval are both done on the same form.
Authored by: Stephen Caine