Skip to main content

@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

Brian Element Mon, 01/18/2016 - 18:32

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

Cristian Gradinaru Tue, 01/19/2016 - 08:37

Hi Brian,
Thanks for your feedback.
The field does exist and it is a character field. I have attached a printscreen.
Cristi

Images

Brian Element Tue, 01/19/2016 - 05:38

Hi Cristi,

Just a thought, which language are you using?  The seperator is different depending on the language.  I think for French and German it is the ";", so try replacing the "," with a ";" and see if that works.

 

Brian

Cristian Gradinaru Tue, 01/19/2016 - 07:51

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

Brian Element Tue, 01/19/2016 - 08:43

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

Cristian Gradinaru Tue, 01/19/2016 - 09:01

As you can see in the attached printscreens it seems to me that the separator "," should work, but it doesn't although I'm using the english language.

Images

Brian Element Tue, 01/19/2016 - 09:04

Ok, thanks for checking.  Another thought.  Did you copy and paste this equation in or did you type it in from scratch?  If you did a copy and paste may be try deleting it and retyping it in using the IDEA defaults.

Cristian Gradinaru Tue, 01/19/2016 - 09:37

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.

Brian Element Tue, 01/19/2016 - 09:41

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?

Cristian Gradinaru Tue, 01/19/2016 - 09:51

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.