Good morning,
please i need the function who return the length of an numeric item from the dictionnary. i know that the length of alpha item is return by the function LENGTH, but what about numeric item ?
Thanks
function who return the length of an numeric item from the dictionnary
Forum rules
New release: CSPro 8.0
New release: CSPro 8.0
Re: function who return the length of an numeric item from the dictionnary
Do you need the max length allowed for the dictionary variable or the length in digits of the number of the current value?
Re: function who return the length of an numeric item from the dictionnary
Hi Josh,
i need the max length allowed for the dictionnary variable
i need the max length allowed for the dictionnary variable
Re: function who return the length of an numeric item from the dictionnary
Not sure what you mean.. Lets say if you have an entry of 333, you want to return the length as 3, and if you have 23456, you want to return the length as 5. Is that what you need a function for?
-
- Posts: 1777
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: function who return the length of an numeric item from the dictionnary
If you don't have a value set, you can use the maxvalue function, which will return the highest value supported by the field. This should get you the length:
length(maketext("%d",maxvalue(ITEM_NAME)));
Re: function who return the length of an numeric item from the dictionnary
Hi Martin,
It is exactly what i wanted,
Thanks a lot.
Please can i have the function who return the number of cases of a data file ?
It is exactly what i wanted,
Thanks a lot.
Please can i have the function who return the number of cases of a data file ?
-
- Posts: 1777
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: function who return the length of an numeric item from the dictionnary
That function doesn't exist in CSPro 6.3. In CSPro 7.0, which is now in beta, you can write:
keylist(DICT_NAME);
That will return the number of cases.