xLookupTop : renvoie un champ du premier record dans une table selon un index

0000001561     -      21/04/2017

Fonction : xLookupTop

Zoom
public static object xLookUpTop(string table_lookup, string index_lookup, string champ_lookup);
public static object xLookUpTop(string table_lookup, string index_lookup, string champ_lookup, string compl_where);

Renvoi : un champ du premier record dans une table selon un index - type object

Paramètres :

  • nom de la table
  • nom de la colonne à utiliser pour le tri
  • nom du champ dont on veut obtenir la valeur
  • paramètre optionnel : clause where (format SQL) pour fixer une condition

Exemples :

xLookupTop("STOCK", "S_ID", "S_TEST") pour obtenir la valeur du champ S_TEST correspondant au premier article trié par S_ID.
xLookupTop("GEN", "G_ID", "G_ID", "G_TITRE=0") pour obtenir le numéro du premier compte du plan comptable

Avant d’utiliser cette fonction, veuillez prendre connaissance de cette page.