KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Avoid confusion between dataClass.newSelection() and Create entity selection
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: August 2, 2019

There are two options when creating an entity selection: dataClass.newSelection() and Create entity selection. Each of these commands will have its own use case. For dataClass.newSelection(), a new blank entity selection will always be created for that specific dataClass. On the other hand, Create entity selection will create an entity selection based on the current selection of its given table argument.

Both commands are capable of generating a new blank entity selection, but it is always safer to use dataClass.newSelection() for new entity selections as it does not rely on any current selection.