Auto increment array widget column value

215 views
Skip to first unread message

ii2team...@gmail.com

unread,
Oct 27, 2014, 2:15:10 AM10/27/14
to suppor...@runmyprocess.com
The plan is to auto increment the 'sl. no.' column value for each row in the array widget. For that I tried to insert the getRowsCount() value of the array widget to the sl.no. field. Am able to alert the getRowsCount() value, but the value is not getting assigned to the column. This way or another is there a way to automatically add incremented value to a field as we press the '+' button in the array widget?

Thanks in advance.

ii2team...@gmail.com

unread,
Oct 27, 2014, 2:31:59 AM10/27/14
to suppor...@runmyprocess.com, ii2team...@gmail.com
On Monday, October 27, 2014 11:45:10 AM UTC+5:30, ii2team...@gmail.com wrote:
> The plan is to auto increment the 'sl. no.' column value for each row in the array widget. For that I tried to insert the getRowsCount() value of the array widget to the sl.no. field. Am able to alert the getRowsCount() value, but the value is not getting assigned to the column. This way or another is there a way to automatically add incremented value to a field as we press the '+' button in the array widget?
>
> Thanks in advance.

I actually tried to insert the getRowsCount() value to the sl.no. field through the initialize property. Is that even possible?

ii2team...@gmail.com

unread,
Oct 27, 2014, 5:29:53 AM10/27/14
to suppor...@runmyprocess.com, ii2team...@gmail.com

Is there a problem in my question?! Why there seems to be no answer to this question?

Murali

unread,
Oct 27, 2014, 5:56:18 AM10/27/14
to suppor...@runmyprocess.com, ii2team...@gmail.com
Hi,

We are working on it and update back ASAP.

Regards,
Murali

Hamza Maghous

unread,
Oct 27, 2014, 6:00:24 AM10/27/14
to suppor...@runmyprocess.com, ii2team...@gmail.com
Hello,

You can use the footer in order to do this. You need to check footer on your column and then implement your javascript
Inline image 1



--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/3f8dadb2-e16b-468f-9588-d0fe3a49cbe0%40runmyprocess.com.



--

Hamza MAGHOUS

PreSales Consultant

Bidisha Das

unread,
Oct 27, 2014, 7:26:41 AM10/27/14
to suppor...@runmyprocess.com, ii2team...@gmail.com
Hi,
You can also use : var rows = id_array.getRowsCount();
                              parseFloat(id_array.id_serialno[P_index].setText(rows));     in the Add rows script of your array widget,so it will automatically increment the "serialno" column on click of "+" .



Thanks & Regards
Bidisha

ii2team...@gmail.com

unread,
Oct 27, 2014, 8:15:46 AM10/27/14
to suppor...@runmyprocess.com, ii2team...@gmail.com
This actually worked.Thanks for the reply. But if the addition of new rows are not done in the final row, there seems to be chaos in the serial number order as the biggest number comes in the intermediate rows. This is same while deletion of rows. Some logic should be applied here.

Murali

unread,
Oct 28, 2014, 6:00:00 AM10/28/14
to suppor...@runmyprocess.com, ii2team...@gmail.com
Hi,

Please include below script in the "Add Rows" & "Delete Rows" section and it should resolve your requirement.

var rows = id_array.getRowsCount();
for(i=0;i<rows;i++)
{
   id_array.id_serialno[i].setText((i+1).toString());
}

Regards,

Murali

Ref.png

Murali

unread,
Oct 28, 2014, 6:56:30 AM10/28/14
to suppor...@runmyprocess.com, ii2team...@gmail.com
Hi,

Please make sure to assign default value as 1 for serial no column, as below events will trigger only upon click of +/- button of the each row.

Regards,
Murali

ii2team...@gmail.com

unread,
Oct 28, 2014, 11:28:28 AM10/28/14
to suppor...@runmyprocess.com, ii2team...@gmail.com
On Tuesday, October 28, 2014 3:30:00 PM UTC+5:30, Murali wrote:
> Hi,
>
>
> Please include below script in the "Add Rows" & "Delete Rows" section and it should resolve your requirement.
>
>
>
> var rows = id_array.getRowsCount();
> for(i=0;i<rows;i++)
> {
>    id_array.id_serialno[i].setText((i+1).toString());
> }
>
>
>
> Regards,
> Murali
>
>
> On Monday, October 27, 2014 5:45:46 PM UTC+5:30, ii2team...@gmail.com wrote:On Monday, October 27, 2014 4:56:41 PM UTC+5:30, Bidisha Das wrote:
>
> > Hi,
>
> > You can also use : var rows = id_array.getRowsCount();
>
> >                               parseFloat(id_array.id_serialno[P_index].setText(rows));     in the Add rows script of your array widget,so it will automatically increment the "serialno" column on click of "+" .
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > Thanks & Regards
>
> > Bidisha
>
>
>
> This actually worked.Thanks for the reply. But if the addition of new rows are not done in the final row, there seems to be chaos in the serial number order as the biggest number comes in the intermediate rows. This is same while deletion of rows. Some logic should be applied here.

This this is what I was wishing for. Don't know how to express my happiness. Very much thanks to Murali. Murali you da man
Reply all
Reply to author
Forward
0 new messages