cancel
Showing results for 
Search instead for 
Did you mean: 

autogenerate field in subform---urgent

Former Member
0 Kudos

Hi All,

I have subform working as table , I have added numeric field to it as autogenerate field , please if you could help me

with the script to do this and on which event i have to write this evevnt ?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member389677
Active Participant
0 Kudos

Hi ,

You can use the calculate event.

Write the below script for the index.

this.rawValue = this.parent.index+1;

Regards,

Shaira.

Edited by: Shaira Madhu on Jan 2, 2012 9:07 AM

Former Member
0 Kudos

many thanks , I have one more quesion how can reset the field if it move to next page ?

Former Member
0 Kudos

What about if I want to reset counter when it reach 10 and count agin ?

Former Member
0 Kudos

I have tried with this script

if( this.parent.index > 9)

{

this.rawValue = 1 ;

}

else

this.rawValue=this.parent.index+1;

but its working fine withe first page from 1-10 the the all the second page 1 !

former_member389677
Active Participant
0 Kudos

Hi,

Try this code.

var a;

a = this.rawValue % 9; // Mod operation

if(a = 0 )

{

this.rawValue = 9;

}

Regards,

Shaira.

Answers (0)