Embedded links in O4W Table cells created via API (O4W)
At 02 APR 2013 05:59:28PM Richard Bright wrote:
I am trying to embed links into the last column cell of a multi-row table.
Using O4WLink I can nearly do this -
A. problem is the procedure also appends a '0' after the text display in the tablecell. So if the cell text value was meant to be '22' we get '220'
/* Loop for rows and columns */
* Last Column in this row
O4WSetCell(CNTR,NUM.FIELDS,
, 'RESULTS_':EACH.FIELD) /*Now add the cell Valueand Link - use subroutine call RSLT1 = ResultData<CNTR, Each.Field> RSLT2 = ResultData<CNTR, NUM.FIELDS+1> URLLink = O4WURL:'O4W_MYPROCEDURE?:RSLT2 O4WText(O4WLink(RSLT1, O4W_LINKTYPE_NORMAL$, URLLink,
, 'ROW_':Cntr, ''))* The below gives the correct text display value without the link
*O4WText(RSLT1)
B. I would like to calculate the url link on the fly - that is - pass parameters to a routine that - when called by the link - will calculate and return the URLLink. (Why - at present I am doing the calculation prior to displaying the value. On one row no problem but on 2000 rows an unneeded overhead when may only be required for one row. )
/* Schema used at present - needs to be in a procedure called by link process as we would in an event*/
Lookup = O4WGenerateID('opac')
Write RSLT2 On O4WTempFile%, Lookup:"_lookup" Else Null
RecID = Lookup:"_lookup"
URLLink = O4WURL:'O4W_MYPROCEDURE?:RecID
C. How might I add a button / image in say last cell of row?
Thanks Richard Bright
At 02 APR 2013 06:39PM Richard Bright wrote:
Well silly me - I didn't need to place the O4WLink in O4WText(), the O4WSetCell() determines the location - just call O4WLink() and we are good.
Now to solve problem B - calulating a url parameter on the fly.
At 03 APR 2013 07:51AM Dave Harmacek wrote:
RE problem B - why don't you must place a button there that computes the link?
Dave Harmacek
Harmacek Database Systems