KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: DAX_Dev_DCS_SetSelection requirement when implementing a DCS
PRODUCT: 4D Web 2.0 Pack | VERSION: 11.2 | PLATFORM: Mac & Win
Published On: August 13, 2008
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

PLEASE NOTE: This Tech Tip applies to 4D Web 2.0 Pack v11 Release 2 (11.2)

When creating a DCS, make sure to call the method DAX_Dev_DCS_SetSelection. This method creates the selection that will be sent to the front end and will need to be called within the Dax_DevHook_DCS_SetSelection method. This is a requirement even if the DCS will contain no records. If this is the case then pointers to empty arrays will need to be passed as parameters for the call to DAX_Dev_DCS_SetSelection.

For example, assuming you create a DCS view with one text field, you will need to initialize the selection with no records by executing the following code.

ARRAY LONGINT(recordid_al;0)
ARRAY TEXT(item1_at;0)
DAX_Dev_DCS_SetSelection(->recordid_al;->item1_at)


Omitting the call to DAX_Dev_DCS_SetSelection will result in the following error message: “4DAF error (code: Internal4DError): A system error has occurred. Please inform the system administrator.”

Note – This error message can be seen in the Javascript console in Safari, in the Firebug window for Firefox, and in Firebug Lite for Internet Explorer.

For the latest information the 4D Ajax Framework please see the Daxipedia:

http://daxipedia.4d.com