Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Clarification needed on Dual Data Type

Dual Data Type means the data value can be interpreted as Text and Numeric. Example: Num(Month('7/9/2016')) = 7 and Text(Month('7/9/2016')) = Jul. So I can say Month function is of dual data type.

But how can we say Peek, Previous, First sorted value and other (Non-Date and Time) as Dual Type?

Example, Previous (expression) - for first row of a table, it returns Null. How can we call Previous function as a Dual Data type?

I do not understand this concept.

Need your help.

3 Replies
tresesco
MVP
MVP

Perhaps, you need peek(). Please refer : Peek() or Previous() ?

swuehl
MVP
MVP

You are referring to the return data type of these functions as described in the HELP, right?

This basically means that Peek() and Previous() should return the field or expression value keeping both representations, text and numeric, when possible (i.e. Peek() will only return the numeric representation if the field value the peek() is referencing is actually showing a numeric representation. The function itself will not create one.)

This should be the case with most functions. Few exceptions: Some string functions like Left() will only return a value with text format (numeric format will be empty), and some aggregations like Sum() will only return a numeric format (still you can use text functions with an implicite text format interpretation).

I believe this should describe the basic design, but you may encounter some issues with dual format handling, as I believe this basic idea is not implemented correctly in all places.

Anonymous
Not applicable
Author

Thanks Swuehl