on 11-01-2015 3:10 PM
I'm a novice UI API developer, developing my first add-on.
I'm using system form 146 (payment means, inside incoming payments).
The matrix is item UID 112.
I'm trying to select the credit card type from code within my add-on.
I couldn't find an example in the SDK how to achieve this.
Again, this is a system form, and it's bound to a system data table (OCRC).
I know the value I want to select, however I can't figure out how to do the selection from code.
Thanks,
Dan
Hi Dan,
Try something like this:
Matrix mtx = (Matrix)Form.Items.Item("112").Specific;
((ComboBox)mtx.Columns.Item("Your collumn ID").Cells.Item("Your row index").Specific).Select("your value", BoSearchKey.psk_ByValue);
Regards,
Diego
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all,
By the time my post was published, I already found the solution.
It's still great to be part of such a helpful community.
This is my final code in case someone will need something similar in the future:
SAPbouiCOM.Item oItem = oform.Items.Item("112");
SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oItem.Specific;
SAPbouiCOM.Columns oColumns = oMatrix.Columns;
SAPbouiCOM.Column oColumn = oColumns.Item("41");
SAPbouiCOM.Cell oCell = oColumn.Cells.Item(1);
SAPbouiCOM.ComboBox oComboBox = ((SAPbouiCOM.ComboBox)(oCell.Specific));
oComboBox.Select(sCardName, SAPbouiCOM.BoSearchKey.psk_ByDescription);
Dan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi, first get the item from the form, then cast combobox item and
sapbouicom.item item = form.items.item("UID");
(((SAPbouiCOM.ComboBox)item.Specific).Select("<KEYVALUE>", SAPbouiCOM.BoSearchKey.psk_ByValue);
check the documentation, under combobox object , select method.
happy coding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.