KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Error 1500. the Attribute Cannot Be Found in the Dataclass.
PRODUCT: 4D | VERSION: 21 | PLATFORM: Mac & Win
Published On: January 20, 2026
The error 1500 is a common error when developing with ORDA. It is commonly caused by trying to access an attribute or member function in a dataclass that simply does not exist.

Here is an example of code that causes this error:

var $contact : cs.ContactsEntity
var $contacts : cs.ContactsSelection
var $position : Integer

$First:="John"
$Last:="Alpha"

$contacts:=ds.Contacts.all().orderBy("lastName")

$contact:=$contacts.query("firstName = :1 & lastName = :2 order by lastName"; $First; $Last)

$position:=$contact.indexOf($contacts)

In this case, the error is caused because the member function indexOf() is applied to an Entity Selection - returned by the query. However, this specific member function is exclusive to an Entity. The error can be resolved by returning an Entity in the query, where the member function indexOf() is available:

$contact:=$contacts.query("firstName = :1 & lastName = :2 order by lastName"; $First; $Last).first()

To recreate the scenario in this tech tip, it is necessary to have a Contacts table, with first and last name fields - or adapt the code to an existing table.