Hi
I am trying to insert data into a collection of records based on Criteria by Using Stateless Form.
Below are the screenshot of What I am trying to achieve by Using stateless Form -- on Success Action.
Screenshot -01 : Here is the data view , There are Seven Columns : one is Market Name and rest are the MVPD names under the market .
Screenshot 02 : This is the Form that will be used to insert a MVPD to all Rows of above View.
screenshot -03 : This is the Final output on Action of Stateless Form and you can see all rows have now "TNT" to respective fields where it was blank not overwritten.
Below is the script that I was trying with but something is wrong there
- for each rec in MVPD_list
- {
-
- mvlist = List();
- mvlist.add(rec.MVPD_01);
- mvlist.add(rec.MVPD_02);
- mvlist.add(rec.MVPD_03);
- mvlist.add(rec.MVPD_04);
- mvlist.add(rec.MVPD_05);
- mvlist.add(rec.MVPD_06);
-
-
- z = mvlist.Size();
-
- if ( z = 0 )
- {
- rec.MVPD_01 = input.MVPD;
-
- }
- if ( z = 1 )
- {
- rec.MVPD_02 = input.MVPD;
-
- }
- if ( z = 2 )
- {
- rec.MVPD_03 = input.MVPD;
-
- }
- if ( z = 3 )
- {
- rec.MVPD_04 = input.MVPD;
-
- }
- if ( z = 4 )
- {
- rec.MVPD_05 = input.MVPD;
-
- }
- if ( z = 5 )
- {
- rec.MVPD_06 = input.MVPD;
-
- }
-
- }
-
Thanks
Arfater