Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have an InputField Inline Table in Script, like this below -
InfuptField Start, End, Duration;
Table:
Load * Inline [
Start, End, Duration
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
0, 0, 0
];
User can enter their desired values in the Table and see their calculations in report.
Is there any Button Action to clear/reset the InputField columns back to their default state (or Zeros in this case)?
Please provide any suggestions to achieve this.
Hi petter-s
I used this VBScript to use in Macro to reset the values and its working well in Chrome, Firefox, IE.
However, I also want to convert this into a JScript - Could you please help?
sub Reset
set obj = ActiveDocument.Fields("Low")
Obj.ResetInputFieldValues 0, x
set obj = ActiveDocument.Fields("High")
Obj.ResetInputFieldValues 0, x
set obj = ActiveDocument.Fields("Percent")
Obj.ResetInputFieldValues 0, x
end sub
You can do it with a a button and a macro
Thanks petter-s
While exploring, I got to know that this Macro can help -
sub reset
set fld = ActiveDocument.Fields("inputtable")
fld.ResetInputFieldValues 0, x
end sub
I will test this for sure, but not sure if that will work on AJAX mode browsers.
Hi petter-s
I used this VBScript to use in Macro to reset the values and its working well in Chrome, Firefox, IE.
However, I also want to convert this into a JScript - Could you please help?
sub Reset
set obj = ActiveDocument.Fields("Low")
Obj.ResetInputFieldValues 0, x
set obj = ActiveDocument.Fields("High")
Obj.ResetInputFieldValues 0, x
set obj = ActiveDocument.Fields("Percent")
Obj.ResetInputFieldValues 0, x
end sub
This should work:
function reset() {
var obj = ActiveDocument.Fields('Low');
var r = obj.ResetInputFieldValues(0);
var obj = ActiveDocument.Fields('High');
obj.ResetInputFieldValues(0);
var obj = ActiveDocument.Fields('Percent');
obj.ResetInputFieldValues(0);
}
Thank you. This works well too in AJAX.
you should right click on the input column in the table then select RestoreValue ->Restore All Value