[ic] [table-editor] question set values

Michael ic at uc9.net
Sat Jun 11 18:53:18 EDT 2005



On Sat, 11 Jun 2005, Duane Hinkley wrote:

> Michael wrote:
>
>> Hi all, I am using IC 5.2 on Debian
>> 
>> I need some help with the table editor tag
>> 
>> I have a table that has these fields
>> hosp,econtactn,doctor, and about 30 more
>> 
>> I have the table editor tag working just great, however, I want to set 
>> these fields to some other values besides what is already in the database. 
>> (In the db they are blank and I want to populate them.
>> 
>> I have a statment like this:
>> [value name='hosp' set=[sql-param hosp] hide=1]
>> [value name='econtactn' set=[sql-param econtactn] hide=1]
>> [value name='doctor' set=[sql-param doctor] hide=1]
>> 
>> That pulls the values I want from a sql table
>> 
>> Then I do something like this.
>> 
>> [table-editor auto-secure=1 table=child key="[cgi userid]"
>> ui_hide_key=1*
>> mv_nextpage="cs.html"
>> 
>> <!-- I have tried both of the lines below but not at the same time -->
>> lookup_query.hosp="select hosp from tablename"
>> value.hosp=[value name = 'hosp']
>> ]
>> 
>> Both  of them worked did not work ata ll.
>> 
>> Can anyone help me, I saw the defaultref in the ic doco, but I can't find 
>> an example of it.

>> 
> Michael,
>
> I use the default option.  I would do it something like this:
>
> [table-editor auto-secure=1 table=child key="[cgi userid]"
> ui_hide_key=1*
> default.hosp="[sql-param hosp]"
> default.econtactn="[sql-param econtactn]"
> default.doctor="[sql-param doctor]"
> mv_nextpage="cs.html" ]
>
> If you don't want the user changing them add the hidden widget like this:
>
> widget.hosp=hidden
>


That works but would require me to have two nested queries, can I do that? 
One query for table-editor the other for default values.  How do I say 
which [sql-param] from which query I want to use?

Thanks,
Michael


More information about the interchange-users mailing list