IsElement ( listName ( stringExpr ) ) suddenly does not work

We do commit a 'List as string' to a function:

Function example1 (doc As NotesDocument, rpm List As String ) As NotesDocument

One value is definitly rpm("[$Art]")="11_Besprechungsprotokoll" (see screenshot of debugger)

IsElement(rpm("[$Art]")) gives back 'FALSE' ... wrong !!!

This behaviour occured 'over night' without changing anything in this context. It is reproducible on server and client. Both are 11.01FP5.

Has anyone an idea ?

Hi, tried to reproduce it in 12.0.1 FP1 and 11.0.1 FP4, using

Dim rpm List As String

rpm("[$Art]")="11_Besprechungsprotokoll"
If Iselement(rpm("[$Art]")) Then
Print {Iselement(rpm("[$Art]")) is True}
Else
Print {Iselement(rpm("[$Art]")) is False}
End If

I do know the debugger display is not always complete. In that Chr$(0) or CR or LF or TAB characters will throw off the display.

Therefore I strongly suspect there is an additional character in the ListTag, or maybe a character with an unexpected Unicode code, where the depiction on screen really looks like one of the chracters in "[$Art]", but is not actually...

To further find what is up, at the point where you expect the "[$Art]" to be present, insert a ForAll loop and look for the value you are expecting, and then inspect the ListTag value by printing the Unicode values of the ListTag:

Dim rpm List As String
Dim tag As String
Dim codes As String
Dim idx As Integer

rpm("[$Art]") = "11_Besprechungsprotokoll"
If Iselement(rpm("[$Art]")) Then
Print {Iselement(rpm("[$Art]")) is True}
Else
Print {Iselement(rpm("[$Art]")) is False}
End If
Forall vRpm In rpm
If vRpm = "11_Besprechungsprotokoll" Then
tag = Listtag(vRpm)
For idx = 1 To Len(tag)
codes = codes & Uni(Mid$(tag, idx, 1)) & " "
Next
Print codes
Exit Forall
End If
End Forall

On my system this prints:

Iselement(rpm("[$Art]")) is True
91 36 65 114 116 93

Thank you for you replies ...

You've reproduced the normal behaviour, which runs 'since decades' in exactly that manner ....

The problem was:

The List was globally defined and then commited to a function as parameter, in this function the error then occured (that worked always in the past).

I've defined the list with privat context. Now it works ...

Hi,

Not able to reproduce it.

You have mentioned that -->

This behaviour occured 'over night' without changing anything in this context. It is reproducible on server and client. Both are 11.01FP5.

Can you try to test the situation by creating a small sample code involving "IsElement" function?

This will help in narrowing down if the issue is specific to your code or occurring to all other set of examples as well.

Quite lengthy but if you wish you can try sample example provided in below URL on server and client both to test the situation.

Examples: IsElement function

Regards,

Amit Sharma