---
url: /flow/guide/scripting-reference/functions/variant/vartostr.md
---

# VarToStr

## Declaration

`Function VarToStr( const V : Variant) : string`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
begin
  Value := VarToStr(Field.Value);
end;
```

## Description

Converts a Variant type variable or field to a string. If the Variant is null then it will return a blank string.

This is more commonly used with Variant type variables rather than fields. When accessing fields you can achieve the same thing by using the [Field.AsString](/flow/guide/scripting-reference/classes/field/field.asstring) property.
