Hi
I need to clear table 1100 — that is, delete all its values.
I tried running this QAction, but it didn't work.
1100 is table
1001 is parameter
1002 is parameter
1003 is parameter
1004 is parameter
#####################################
(This part of QAction delete table)
object[] columnClearInfo = { 1100, 1101, 1102, 1103, 1104 };
object[] columnClearValues = {
newobject[0], // PK
newobject[0], // UUID
newobject[0], // Name
newobject[0], // State
newobject[0], // Chunking
};
protocol.NotifyProtocol(220, columnClearInfo, columnClearValues);
#####################################
<Paramid="1101">
<Name>ServiceTableUUID</Name>
<Description>UID</Description>
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<Type>string</Type>
<LengthType>next param</LengthType>
</Interprete>
<Display>
<RTDisplay>true</RTDisplay>
</Display>
<Measurement>
<Type>string</Type>
</Measurement>
</Param>
<Paramid="1102">
<Name>ServiceTableService</Name>
<Description>Service Name</Description>
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<Type>string</Type>
<LengthType>next param</LengthType>
</Interprete>
<Display>
<RTDisplay>true</RTDisplay>
</Display>
<Measurement>
<Type>string</Type>
</Measurement>
</Param>
<Paramid="1103">
<Name>ServiceTableStateService</Name>
<Description>Service Status</Description>
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<Type>string</Type>
<LengthType>next param</LengthType>
</Interprete>
<Display>
<RTDisplay>true</RTDisplay>
</Display>
<Measurement>
<Type>string</Type>
</Measurement>
</Param>
<Paramid="1104">
<Name>ServiceTablechunk</Name>
<Description>Chunk</Description>
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<Type>string</Type>
<LengthType>next param</LengthType>
</Interprete>
<Display>
<RTDisplay>true</RTDisplay>
</Display>
<Measurement>
<Type>string</Type>
</Measurement>
</Param>
<Paramid="1100"trending="true">
<Name>ServiceTable</Name>
<Description>Table Of Services</Description>
<Type>array</Type>
<ArrayOptionsindex="0"options="key" >
<ColumnOptionidx="0"pid="1101"type="retrieved"options=";save" />
<ColumnOptionidx="1"pid="1102"type="retrieved"options=";save" />
<ColumnOptionidx="2"pid="1103"type="retrieved"options=";save" />
<ColumnOptionidx="3"pid="1104"type="retrieved"options=";save" />
</ArrayOptions>
<Information>
<Subtext>
<![CDATA[Table Of Services]]>
</Subtext>
</Information>
<Display>
<RTDisplay>true</RTDisplay>
<Positions>
<Position>
<Page>Services</Page>
<Column>0</Column>
<Row>0</Row>
</Position>
</Positions>
</Display>
<Measurement>
<Typeoptions="tab=columns:1101|0-1102|1-1103|2-1104|3,width:350-220-112-100,sort:STRING-STRING-STRING-STRING,lines:10,filter:true">table</Type>
</Measurement>
</Param>
Hi Jose
When you want to clear an entire table, the most efficient approach is to use the clear action in the XML. This way, you don't need to retrieve all the keys in the QAction; you simply execute protocol.CheckTrigger(Id)
Regards

Hi Jose,
To remove rows from a table, you could use the following methods:
- Method ClearAllKeys
- Method DeleteRow: In this case you need the index of the row. You can get the index of the row using GetKeys.
Hope it helps.

Hi Miguel,
I use protocol.ClearAllKeys(1100); but no clear the table.
Hi Tiago,
I use this in my Qaction before fill columns
protocol.CheckTrigger(1100); //table
protocol.CheckTrigger(1101); //parameter1
protocol.CheckTrigger(1102); //parameter2
protocol.CheckTrigger(1103); ////parameter3
And in my XML
<Action id="9">
<Name>services</Name>
<On id="21">parameter</On>
<Type>clear</Type>
</Action>
But didn't work, when QAction is running add new line but no clean my table.