Показать сообщение отдельно
Старый 21.12.2005, 17:49   #5  
Delfins_imported is offline
Delfins_imported
Участник
 
147 / 10 (1) +
Регистрация: 24.03.2004
Eto potomu chto skoree vsego znachenije suschestvujet v tablice...

Vot moj Final-kod

Код:
public void init()
{
	DictField   dictField;
	Common	  c;
;

	super();	
	if (this.args().lookupField() && this.args().lookupValue() != "" )
	{
		// Check bug on Integer `0` value
		if (this.args().lookupValue() == "0")
		{
			// --> Thanks AndyD
			dictField = new DictField(this.dataSource().cursor().TableId, this.args().lookupField());
			if (dictField && dictField.baseType() == Types::Integer)
				this.args().lookupValue("");
			// <-- Thanks AndyD
		} else {
			// Check if exists
			c.data(this.dataSource().cursor());
			select  c
			where   c.(this.args().lookupField()) == this.args().lookupValue();
			if ( !c.RecId )
			{
				this.args().lookupValue("");
			}
		}
	}
}