I want to add a row in a table based upon Number given in a textfield, eg- if 5 is given 5 rows must be added,again if some other no. is given then that many rows only should be present + if no. is greater than the previous then those rows should be retained so that user dont have to write again , please suggest something. i have kept the row in a subform and i am able to get the result for 1st time but when changing the value desired reult is not obtained
for (var i = val; i>1 ;i--)
{
_test.removeInstance(i-1);
}
this is the simple code used,i am not able to use it with right condition i guess.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Kunal,
Pls try doing the following:
1) Reomove all the script on the exit event of "NumArticle"
2) Don't set max count.
3) Set only min count = 1
4) Add the following script on the exit event of "NumArticle"
Form1_Dtls.MainPage.EntrenchmentDetails.instanceManager.count = this.rawValue;
[Don't add any other script other than the above line]
Pls give a try and let me know.
Thanks,
VJ
Views
Replies
Total Likes
Hi Kunal,
You can use the following script on the exit event of the numeric field:
form.Page1.Table1.Row1.instanceManager.count = this.rawValue;
Where, Row1 is your repeating row.
Let me know if this works.
Thanks,
VJ
Views
Replies
Total Likes
thanks,its working,but i am getting 1 row extra,subform+instances,but i only want instances,then what to do ?
Views
Replies
Total Likes
Views
Replies
Total Likes
i can not,because of company policies
Views
Replies
Total Likes
Is it not possible to send a sample form - A form in which only the repeating subform copied and confidential data masked?
btw, did u select min count = 1 ?
Thanks,
VJ
Views
Replies
Total Likes
yes i kept the min and max count,the only prob is one extra row is coming,
----- Form1_Dtls.MainPage.NumArticles.NumArticle::exit - (JavaScript, client) ----------------------
if(this.rawValue != null)
{
var val = this.rawValue;
if ( val > 91) val = 91;
for(var i=1; i<val ; i++)
{
Form1_Dtls.MainPage.EntrenchmentDetails.instanceManager.count = this.rawValue;
_EntrenchmentDetails.addInstance(0);
}
}
this is the code i used,even i tried with i in addInstance,but dint work
Views
Replies
Total Likes
Hi Kunal,
Pls try doing the following:
1) Reomove all the script on the exit event of "NumArticle"
2) Don't set max count.
3) Set only min count = 1
4) Add the following script on the exit event of "NumArticle"
Form1_Dtls.MainPage.EntrenchmentDetails.instanceManager.count = this.rawValue;
[Don't add any other script other than the above line]
Pls give a try and let me know.
Thanks,
VJ
Views
Replies
Total Likes
thanks alot vijay it is working,u saved a lot of my time.
Views
Replies
Total Likes
Hi Kunal,
No problem.
can u mark this answer as "Correct"? This would be helpful to others.
Thanks,
VJ
Views
Replies
Total Likes
Hi VJ,
I am using this form with radio buttons,on yes this functionality works,but on NO,how to hide the instances ?
Views
Replies
Total Likes
You can hide the entire section as:
Form1_Dtls.MainPage.EntrenchmentDetails.presence = "hidden";
Thanks,
VJ
Views
Replies
Total Likes
with this only main subform is hiding,instances are not going,i already applied this
Views
Replies
Total Likes
If your repeating instances are a part of your main subform, then the instances should also hide.
Make sure that your instances are inside you main subform and not outside or at same level of the main subform.
--- The following is correct -----
<subform>
<repeatingsubform>
</subform>
--- The following is wrong -----
<subform></subform>
</repeatingsubform> </repeatingsubform>
I could check if you can share me the sample template.
Thanks,
VJ
<subform>
<repeatingsubform>
</subform>
i am following this hierarchy throughout the form
but for this i am giving radiobutton condition in one subform,textfield condition in another,and then repeating is 3rd,shall i keep these 3 subforms again in a single subform ?
Views
Replies
Total Likes
Views
Likes
Replies