Skip to Content
0

Numeric prompt with default value

May 23, 2017 at 04:31 PM

34

avatar image

I need to create a dimension that prompts for a numeric value, with a default of 0.95. This syntax:

@Prompt('Enter target rate','N',,mono,free,persistent,{0.95})

generates an error:

Parse failed:  Invalid definition (UNV00023).  Error parsing default values parameter (7th parameter).

What's the correct syntax for this?

udt
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Abhinav Shrivastava May 23, 2017 at 04:43 PM
0

Hi Craig
This should work, its working for me in efashion:
@Prompt('Enter value','N',,Mono,Free,Persistent,{'0.95'})

-Abhi
Show 1 Share
10 |10000 characters needed characters left characters exceeded

I wrapped it with to_number so its data type matched the dimension:

to_number( @Prompt('Enter value','N',,Mono,Free,Persistent,{'0.95'}) )
0