    

 ## On this page

  

 

 # toFormattedString

 Last update: 16.07.2025 

public [toFormattedString](to-formatted-string.md)(index: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)): [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html)

converts the variable value to a formatted string representation. If the variable is not currently valid, it is first validated.

#### Return

the string value of the formatted variable

#### Parameters

indexthe array element to get (0-based index)#### Throws

[ModelCenterException](../-model-center-exception/index.md)