Juned,
General remark: Ebase has two scripting languages: Javascript and FPL. If you're new to Ebase and have some experience of programming languages, I would use Javascript - it's more powerful and faster to use.
1. Do you mean that the user can only select one row in a table? This is a bit of a strange user interface and is not that easy to achieve. An alternative way of doing this might be to use a single field instead of a table - you could then add a list to this and display it as a list of radio buttons. This would not look the same as a table but might be OK for what you want to achieve. It's certainly much easier to implement.
If you really want to have a single row selector in a table, I think you would need to do this by adding a boolean checkbox column to the table with the
immediate validation option set, then write a script that gets control on each click, loop through the table and unset all the other checkboxes - very messy!
2. To set styling properties for an individual row, you need to loop through the table before it's displayed and set whatever properties you need. Note that you are setting properties for individual table cells, not rows. Example (Javascript):
Code: Select all
var rows = tables.MYTABLE.rows;
while (rows.next())
{
if ( xxxxxxx ) // your condition
{
tables.MYTABLE.COLUMN1.backgroundColor = "red"; // set properties for a single table cell
tables.MYTABLE.COLUMN2.backgroundColor = "red"; // set properties for a single table cell
}
}
3. In Javascript, you cannot set styling properties for an entire row, you have to set each table cell individually. In FPL, you have the
highlight row command which works on an entire row. Example:
Code: Select all
loop at table MYTABLE
if [ xxx ]
highlight row CLASS1;
endif
endloop
Where CLASS1 is a css class defined in a style sheet being used by your form. If you don't already have a style sheet, you can create a new one in the tree under
Web Resources and then link it to your form using
Form Properties > Web Resources.
If I was doing this, I would use Javascript and approach 2.
Regards
Jon