Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
go2sath

New Member
Registered:
Posts: 4
Reply with quote  #1 

Hi,

I have created a editable grid but the parameters for the grid business object is not a default parameter. I wrote a sql query to get the parameters mapped with the columns in the table. 

BusinessObject_Variable.jpg 

When i deploy and test the grid, i was able to populate the already existing data in the grid but the new data couldnt be saved. Even though the insert and delete options are available in the grid, data is not saved to the database. So after i save the form and reopen, i dont find the value that i entered newly in the form.

Is there any way to solve this issue to get the data save function work in the grid even when the input parameter is not default efolderid value?


0
praxkan

Veteran
Registered:
Posts: 142
Reply with quote  #2 
One of the undocumented requirements of editable grids with inserts enabled is that one of the columns in your underlying table needs to be marked a primary key. Check if you have a primary key (id column or something) marked on the editable grid.
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #3 
There is no 'default', so this must always be set up manually. Typically you would use the Folder Id, but not always.

To set up the correct values for an editable grid, you need to set the 'default' value for the respective grid column. Typically this may be the Folder Id, or any other identifying value. Obviously this column has to be added to the grid, generally as a hidden read-only field and the default value set.

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #4 
Quote:
Originally Posted by praxkan
One of the undocumented requirements of editable grids with inserts enabled is that one of the columns in your underlying table needs to be marked a primary key. Check if you have a primary key (id column or something) marked on the editable grid.


I think that is done as the editable grid is working. If this is not set, the grid is still read-only. Your point is a good one, however.

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
go2sath

New Member
Registered:
Posts: 4
Reply with quote  #5 
Quote:
Originally Posted by Jerome
There is no 'default', so this must always be set up manually. Typically you would use the Folder Id, but not always.

To set up the correct values for an editable grid, you need to set the 'default' value for the respective grid column. Typically this may be the Folder Id, or any other identifying value. Obviously this column has to be added to the grid, generally as a hidden read-only field and the default value set.



Hi Jerome,

My grid's corresponding business object table doesnt have the folder id or any other default Metastorm process context's identifying value in it, so i wont be able to use any of them. And i wont be able to change the table structure now also. So in this case, how do i solve the save issue of editable Grid?

0
go2sath

New Member
Registered:
Posts: 4
Reply with quote  #6 
Quote:
Originally Posted by Jerome
Quote:
Originally Posted by praxkan
One of the undocumented requirements of editable grids with inserts enabled is that one of the columns in your underlying table needs to be marked a primary key. Check if you have a primary key (id column or something) marked on the editable grid.


I think that is done as the editable grid is working. If this is not set, the grid is still read-only. Your point is a good one, however.



Yes you are right..I have the primary key column in my editable grid already. But still its not working.
0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #7 
Quote:
Originally Posted by go2sath

Hi Jerome,

My grid's corresponding business object table doesnt have the folder id or any other default Metastorm process context's identifying value in it, so i wont be able to use any of them. And i wont be able to change the table structure now also. So in this case, how do i solve the save issue of editable Grid?



What are the criteria you use to filter the grid for this folder?

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
go2sath

New Member
Registered:
Posts: 4
Reply with quote  #8 
Quote:
Originally Posted by Jerome
Quote:
Originally Posted by go2sath

Hi Jerome,

My grid's corresponding business object table doesnt have the folder id or any other default Metastorm process context's identifying value in it, so i wont be able to use any of them. And i wont be able to change the table structure now also. So in this case, how do i solve the save issue of editable Grid?



What are the criteria you use to filter the grid for this folder?


My grid input parameters are what i have shown in my 1st query's picture. Filter criteria for the grid is the same.

Table name - FAB7.FSIM_MISTI_BKG
Filter - MISTI & REV

Parameters
Misti = SelectSql(new MetastormDefault(),"select txtMistiNo from FSIM where EFOLDERID='"+ProcessContext.FolderId+"'")
Rev = SelectSql(new MetastormDefault(),"select intRev-1 from FSIM where EFOLDERID='"+ProcessContext.FolderId+"'")

And my Table Design structure for your reference

Table name - FAB7.FSIM_MISTI_BKG
Columns -

Column NameDataTypeAllow Nulls
IDintUnchecked
MISTIvarchar(20)Checked
REVintChecked
ROW_IDintChecked
CON_FROMvarchar(50)Checked
CON_TOvarchar(50)Checked
LVL_FROMintChecked
LVL_TOintChecked
VOLTAGEvarchar(30)Checked
PHASEvarchar(30)Checked
PEAK_AMPSvarchar(30)Checked
RUN_AMPSvarchar(20)Checked
REMARKSvarchar(250)Checked
STATUSvarchar(20)Checked



0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #9 
Sorry, I didn't look properly.

All you should need to do is add these fields to the grid and add the value you set as the default parameter value as the default for these two fields. That should work.

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!