« Back to AAU Project

Counting the number of rows of the record after deleting rows

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
 I am trying to count the number of rows of the record after deleting rows, unfortunately, it does not work,
It returns -1.
The record name is „Attributes“ and has 3 elements „Name“, „Range“ and „Value“.
 
ON_EVENT "DeleteInstance" {
SETG id_InstId: (instid)
SETG id_classid: (classid)
SETG id_modelid: (modelid)
SETG str_InstanceName: (name)
  CC "Core" GET_REC_ATTR_ROW_COUNT objid: (id_classid) attrid: (id_InstId)
  SETL nCount : (count)
  CC "AdoScript" INFOBOX (" ID     " + STR nCount)
  }

RE: Counting the number of rows of the record after deleting rows
Answer
6/22/15 10:23 AM as a reply to Fadi Al Machot.
Hi, Fadi.

When doing the command call
CC "Core" GET_REC_ATTR_ROW_COUNT objid: (id_classid) attrid: (id_InstId)

you are passing the classid as parameter objid, but you should pass the intance ID.

Try the following calls:

CC "Core" GET_ATTR_ID classid: (id_clasid) attrname: "Attributes"
SETL id_attrid: ( attrid )
CC "Core" GET_REC_ATTR_ROW_COUNT objid: (id_InstId) attrid: (id_attrid)

Sabin