Hi,
I have a requirement where I need to append 2 spaces to ta textfield at the end of field for certain conditions.
I used Concat() function and if I checked the length, it added the space successfully in the scripting. But in the output display, it is not considering the space to the text. I need this particularly because all my text fields are right alligned and if I have a space appended to the text at the end, I should able to see it in the form
for ex:
I need Martin ( for the first text field)
Martin ( with two spaces appended)
I need the output in the above way.
Can you please help me out.
Sample code I wrote on scripting:
var raw = $.rawValue
$.rawValue = Concat(raw, Space(2))
-----------------------------
If I check the length of field, I could see that length got increased by 2. But I cannot display in the output.
Thanks in advance,
k.c
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Instead of inserting white spaces script to change the right indent:
if (this.rawValue == "Martin")
{
this.para.marginRight = "1.5mm";
}
else
{
this.para.marginRight = "0mm";
}
This is Javascript, but I am sure it will run in FormCalc.
N.
Views
Replies
Total Likes
Hi,
Instead of inserting white spaces script to change the right indent:
if (this.rawValue == "Martin")
{
this.para.marginRight = "1.5mm";
}
else
{
this.para.marginRight = "0mm";
}
This is Javascript, but I am sure it will run in FormCalc.
N.
Views
Replies
Total Likes
I might be oversimplifying this but would it work to just set the right margin in the layout tab? No point writing a script if you don't need it.
Views
Replies
Total Likes
Hi,
Sorry for the delay in replying. Thanks for your valuable answer nail. It helped me to solve my problem.
and this is for the other reply,
we need to set the margin based on dynamic data. Hence, we need to set it on scripting only.
Regards,
k.c
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies