Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've a field A as input field. Now when i change a any value of the field in the tablebox then i want to hide one button.
I usually create calculated variable vInputChanged: = sum(all if( not A_inputfield = A_shadowfield, 1, 0))
It will show number of changed inputfield values. With no changes the value is 0. Keyword "all" disregards any selections.
Then use this variable in the object's show condition as needed.
First create (in the script) a Shadow-field with the original value of the Inputfield
Then make a condition in Conditional Show in the Layout Tab of the properties:
Value of Shadow-field = Value of Inputfield
Toggle between show all Tabs and Objects by using the <Ctrl>+<Shift>+<S> shortcut.
OK?
Ya i created shadow field and tried as you said previously but the think is if you select only one data value it will work.
For Eg:
ID SName LName
1 A Z
2 B Y
- Assume that the above structure is displayed in tablebox and the input fields are SName, LName.
- Now i'll change A to AAA it will not hide the button. But if you contain table box like below it will work.
ID SName LName
1 A Z
I usually create calculated variable vInputChanged: = sum(all if( not A_inputfield = A_shadowfield, 1, 0))
It will show number of changed inputfield values. With no changes the value is 0. Keyword "all" disregards any selections.
Then use this variable in the object's show condition as needed.
Thanks Tanel it's working. But, when i want to see the button i need to give A_inputfield value as per data what we have previously. The think is i will change the value and then i perform another selections and i leave the file. When again i open the file i not able to see the button b'coz the inputfield value is changed. Is there any process to control this.
I'm not sure if that is what you ask for, but to delete user input you use macro:
sub ResetInput
set fld1 = ActiveDocument.Fields("A_inputfield")
fld1.ResetInputFieldValues 0
'Reset mode (integer) 0 = Reset all values, 1 = Reset possible values, 2 = reset single valueend sub
Note that in most situations it is good to set this macro triggered by OnPostReload too (if you change inputfield values during reload).