Hey everyone
I wrote script in vba, something like that:
"
Imports System
Imports Microsoft.VisualBasic
Dim testResult As Boolean =context.Field("Save1").value
if testResult <> 0 Then
context.Field("Description").IsVisible = false
else
context.Field("Description").IsVisible = true
end if
"
Field "Save1" is type of checkbox. When I checking this box field "Description" is still visible. And my function doesn't work. This work only during first load, processing document OCR. When I verify document on verification station and check this box this is still visible.
I don't understand why
Do you have any idea?
コメント
4件のコメント
Hello,
As we understand your requirements, you need to hide fields depending on the checkmark’s state.
Field visibility cannot be changed during the stages. To change fields' visibility you may place your script e.g. on the event handler level, Project properties > Event Handlers Tab "After document state changed" event would be a good place for it, where ChangedStates.Has(2) (2 is for "Recognized").
Please note, that in such scripts fields' names should be used in FullName format (like "Document Section 1\Checkmark1")
To get more information, please check the following topic if ABBYY FlexiCapture 11 Developer's Help:
Appendix > Using scripts in ABBYY FlexiCapture > Scripts for customizing processing stages > Types of scripts > Event handlers > Document state changed
Hello Ekteina, I took your advice.
And try yo use script like this:
But it's not working for me((
Can you help?
Hello,
Please send us more details how exactly you script does not work. It will be great to see the screenshot..
I am trying to do same in Document Definition level, want to hide some fields and want to block from export. Any suggestions please.
サインインしてコメントを残してください。