Populating values to Record Group from Multi record Datablock of Forms [message #561969] |
Thu, 26 July 2012 08:34 |
|
muralimanohar
Messages: 12 Registered: March 2012 Location: Kurnool,A.P
|
Junior Member |
|
|
My procedure proc_ex is in when_validate_item trigger
I have one Multi Record data block in my form with values in its items
I need to Populate multi record block values to one Record Group using
add_group_row,
add_group_column,
set_group_char_cell to populate values to record group
Let us suppose my multi record data block looks like
item1 item2 item3 item4
10 20 50 70
25 15 30 45
45 90 47 38
75 25 85 90
30 56 78 80
Can any on please tell me how to populate these multi record datablock values to Record Group ???..Eagerly waiting for your Replies...Thanks in advance !!!!!!!!!!!!!!
[Updated on: Thu, 26 July 2012 08:39] Report message to a moderator
|
|
|
Re: Populating values to Record Group from Multi record Datablock of Forms [message #561997 is a reply to message #561969] |
Thu, 26 July 2012 13:02 |
cookiemonster
Messages: 13938 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
I can think of three options:
1) Loop through the records in the datablock using first_record / next_record
2) Make sure each record is posted to the DB and read the data from the DB using a select statement.
3) Get all the values when the data is queried/inserted in the first place (using post-query and post-insert) then modify individual rows in the group as the corresponding block row is modified
You can't do option 1 from a when-validate-item trigger. So that leaves options 2 or 3.
|
|
|
|
Re: Populating values to Record Group from Multi record Datablock of Forms [message #562035 is a reply to message #562007] |
Fri, 27 July 2012 04:28 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
That is what cookiemonster said: option 1 is not available. I have a couple of questions:
1. How do you populate your multirecord block? If it is a basetable block: use the query to populate that block to populate the record group.
2. Can you modify the multirecord block (i.e. has the block insert/update allowed set to true?).
Basically, you want to have the same data in your multirecord block as in your record group. Depending on your answers the solution might be different.
MHE
|
|
|