hello
anybody noticed that you can’t activate the sorting for additional fields you add to grid? why not!? only database fields can be sorted!?
any idea workaround?
hello
anybody noticed that you can’t activate the sorting for additional fields you add to grid? why not!? only database fields can be sorted!?
any idea workaround?
Assuming your SQL for defining the grid is SELECT field1, field2…, you can try adding , NULL as fake1, NULL as fake2. So the SQL becomes SELECT field1, field2, NULL as fake1, NULL as fake2…
Then you can manipulate fake1 and fake2 in OnRecord as needed.
thanks bradk,
example for manipulate fakex in onrecord?
afaik that to activate the sorting from scriptcsase must fields show in the “sorting” section so you can actiavet them
assuming this way to make you sort them with the code
please explain if possible
thanks
Mike- Yes, you need to make the dummy fields (fake1, fake2) visible in your grid. Then you can sort on them. With respect to manipulating the NULL values in OnRecord, that depends on what you are hoping to accomplish. For example, if you had a field {grams} that listed the weight of an item and you wanted to create a sort field based on small, large, then your onRecord code might look like this:
if ({grams} <100) {
{fake1} = ‘SMALL’;
} else {
{fake1} = ‘LARGE’;
}
Then you should be able to sort on SMALL/LARGE for fake1.
Brad