TypeDescription.AdjustValue

Syntax:

AdjustValue(<Value>)

Parameters:

<Value> (optional)

Type: Arbitrary.
The value to be adjusted.

Returned value:

Type: Arbitrary.
If a value is passed, a determination is made as to whether or not the value corresponds to the type description. If the value does correspond to the type description, the method returns the passed value. Otherwise, the value will be adjusted to the type that is available in the type description.
If the value is not passed, the default value for this type description is returned.

Description:

Ca value based on type description and the passed value.

Availability:

Thin client, web-client, server, thick client, external connection, Mobile application (client), Mobile application (server).

Example:

// There is a Articles table box located on a form. 
//In this table box there is a BeginChoice event 
//defined for a Nomenclature column cell. The handler 
//for this event is listed in the example
//Procedure ArticlesNomenclatureBegingChoice(Item,StandardProcessing)
    CatType = "CatalogRef.Nomenclature";
    Item.TypeRestriction = New TypeDescription(CatType);
    Value = Item.Value
    Item.Value = Item.TypeRestriction.AdjustValue(Value);
    Item.ChooseType = False;
EndProcedure


    

1C:Enterprise Developer's Community