Event asearch_trans_after

This event is used for representations when a search facet is requested. It is applicable on every line returned by the query that the search index launches during indexation work.

It can be used to assign properties that are not present in the tables or that have a different name so that the Setinstance instruction for the class property allocation will not be blocked.

Available variables

  • this is defined and corresponds to the data class representing a line.
  • The tables present in the query are filled with the values of the current line. It can be the [LNK_] class if the class is an interface class, or the different tables present in the Link instruction.

Example

# A field has been added in the class to give the length of another column,
# and a ranking based on a computation
$ TRANSFER_FIELDS
  this.FLDLEN=len([MYT]COMMENT)
  this.MARK=string$([MYT]AMOUNT<100,"poor")+string$([MYT]AMOUNT>=100 and [MYT]AMOUNT<1000,"average")
&          +string$([MYT]AMOUNT>=1000 and [MYT]AMOUNT<5000,"good")
&          +string$([MYT]AMOUNT>5000,"outstanding")
Return