@Isini function
Hi everybody,
I know that this thread is for custom functions, but I did not find a thread for the built - in functions.
I'm having some difficulties in using @Isini function. Using the syntax provided by the equation editor < @Isini(''Co'', SUPPLIER) > on a character field I'm getting an error with the message "syntax error". Any ideas / suggestions?
Thanks,
Cristian Gradinaru
Hi Brian,
Hi Brian,
I am using english language. Inserting the separator by clicking the "," symbol in the equation editor or manually makes no difference. The error is still present. I tried using other punctuation marks (such as : or ;) as separators but with no success.
This is getting annoying and I'm running out of ideas...
Cristi
Hi Cristi,
Hi Cristi,
This is strange. When it gives you the syntax error where does it show you the error is?
Also can you go into the IDEAScript editor and paste this script in and run it. The message box should show what you should be using as a list separator. Another things, can you go into your regional settings and let me know which language you are using that might also help.
Public Const LOCALE_SLIST = &HC ' list item separator
Public Const LOCALE_SDECIMAL = &HE ' decimal separator
Public Const LOCALE_SDATE = &H1D ' date separator
Public Const LOCALE_STIME = &H1E ' time separator
Public Const LOCALE_SYSTEM_DEFAULT& = &H800
Public Const LOCALE_USER_DEFAULT& = &H400
Dim sListSeparator As String
Dim sDecimal As String
Dim sDateSeparator As String
Dim sTimeSeparator As String
Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long
Sub Main
Call populateLocalVariables()
MsgBox "List Separator: " & sListSeparator
End Sub
Function populateLocalVariables()
sListSeparator = ReadLocaleInfo(LOCALE_SLIST )
sDecimal = ReadLocaleInfo(LOCALE_SDECIMAL )
sDateSeparator = ReadLocaleInfo(LOCALE_SDATE )
sTimeSeparator = ReadLocaleInfo(LOCALE_STIME )
End Function
'*****************************************************************************************************************
'* VB function found at http://www.xtremevbtalk.com/showthread.php?t=162703
'* will return the regional setting based on the constant sent to it.
'*****************************************************************************************************************
Public Function ReadLocaleInfo(ByVal lInfo As Long) As String
Dim sBuffer As String
Dim rv As Long
sBuffer = String$(256, 0)
rv = GetLocaleInfo(LOCALE_USER_DEFAULT, lInfo, sBuffer, Len(sBuffer))
If rv > 0 Then
ReadLocaleInfo = Left$(sBuffer, rv - 1)
Else
ReadLocaleInfo = ""
End If
End Function
I inserted from the equation
I inserted from the equation editor by double-clicking it and then typing the parameters and the separator. I also typed the function from scratch. None of these worked. However, when I click the ok button from the error box the equation editor highlights the separator ",", so I guess the error is somehow connected to the separator.
Right now I am at a loss what
Right now I am at a loss what to suggest. Do you have a maintenance contract with IDEA? If so I would contact your IDEA distributor for help. Can you also check your regional settings and not your language settings as they could be different. So in the control panel under the region and language which format are you using?
Yeeah,
Yeeah,
Your suggestion regarding regional setting did the trick. I used to have the decimals separator set to "," and the digit grouping set to ".". After I reverted to the default settings and restarting Idea the function works as expected.
Thank you Brian for yout assistance and patience.
Hi Cristian and welcome to
Hi Cristian and welcome to the site.
One way you could get a syntax error is if the field does not exist. Are you sure that the SUPPLIER field exists and that it is a character field?
Brian