Hi,
i have a QAction:
<QAction id="100" name="show me the data" encoding="csharp" triggers="4002" row="true">
After adding (row="true") and specify in the QAction ( string sRowKey = protocol.RowKey();)
the QAction is not executing. After deleting the row="true" the QAction works well.
QAction: 100
[....] try
{
protocol.ShowInformationMessage("u pressed me");
string sRowKey = protocol.RowKey();
}
[....]
My Table:
<Param id="1000">
<Name>Rails Monitor</Name>
<Description>shows the Rails and the Counts</Description>
<Type>array</Type>
<ArrayOptions index="0">
<ColumnOption idx="0" pid="1001" type="retrieved" options=""/>
<ColumnOption idx="1" pid="1002" type="retrieved" options="" />
<ColumnOption idx="2" pid="1003" type="retrieved" options="" />
</ArrayOptions>
<Information>
<Subtext>Requesting Data with API-Calls </Subtext>
</Information>
<Display>
<RTDisplay>true</RTDisplay>
<Positions>
<Position>
<Page>Layouts</Page>
<Column>0</Column>
<Row>7</Row>
</Position>
</Positions>
</Display>
<Measurement>
<Type options="tab=columns:1001|0-1002|1-1003|2,width:100-141-173,sort:STRING-STRING-STRING,lines:25,filter:true">table</Type>
</Measurement>
</Param>
Did I miss something ?
Thanks in advance
Hi!
I see that the QAction is being triggered by triggers="4002". What is that? Is that a single parameter?
For the row="true" to work, the Qaction needs to be triggered by a table or
From DataMiner 9.5.1 onwards, a read column parameter can be used as a trigger on a QAction with row=true option (RN 14050, RN 15531).
You can read more about the row attribute here.
Hope that helps!
row=”true” is only to be used if you execute logic from a row in a table (aka you need to know which row executed the logic, hence why you combine it with protocol.RowKey to find the key of that row). Since your button is not part of a table row, the row=”true” should not be used.
Thanks,
I understand now, the button must be a part of the table.
Have you any idea how I can fill the table with the (outside the table) Button?
I found various functions for AddRow, SetParameterRow.
I tried with the protocol.FillArray() function and it works for me now.
What could be other ways to fix this issue?
thanks
There is no need to put the button in the table. All that matters is that you don’t need the row=”true” if the button is not in the table, because otherwise it will cause a conflict because the QAction is expecting row-specific logic.
Either way, the row=”true” button only matter on how the QAction is called, it does not change the functionality that can be used in the QAction itself.
Indeed you can use the FillArray method to fill a table with multiple rows. If you want to add/edit single rows, you can use AddRow and SetRow
To summarize: You have a button outside a table (ID: 100 for example). That calls a QAction which has trigger=”100″ and does NOT have the row=”true” because the button is not in a table row. In the QAction you collect or generate data and you can use FillArray to fill the table that mentioned
Hi,
thank you for this answer.
the trigger is a button outside the table.
As I understand the button must be an element of the table ? (inside the table)
Even it says if the row changes, but I don’t have any row currently.
My Table is empty and I want to add the first row with this function:
https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Scripting.SLProtocol.AddRow.html
“int AddRow(int tableId, string row)”
My scenario is that I want to fill the table with the button click. but the button is outside the table.