Thursday, August 25, 2016

Solution to Problem: Bug with nested Docvariables updating?

Bug with nested Docvariables updating?

I think there's a bug in the way that nested docvariable fields update.
I'm posting this here in the hopes that someone has found a way around this (the question is about fields, but I'm using VBA to manipulate them, so I honestly don't know which forum
is best.
Fingers crossed.)

The issue (I think) is that a Docvariable field can't be updated if it is not (or would not) be evaluated by the larger expression.
In general practice this is probably not a big deal, but I'm trying to check that fields haven't been typed over, and it
is a problem when the value of the docvariable doesn't match its result. 

Create three document variables

- In the VBE Immediate Window:

activedocument.Variables("Var1").Value = "dog"
activedocument.Variables("bVar1").Value = "true"

Create some fields

- In the document (all brackets should be created using Ctrl+F9:

IF {DOCVARIABLE  Var1 = "dog" "Found a dog!"

IF {COMPARE {DOCVARIABLE  bVar1 = "true" = 1 DOCVARIABLE  Var1 IF {DOCVARIABLE  Var1 = "giraffe" "giraffe"

Update all fields and view their results.
You should see:
Found a dog!

As expected.
Now, change the value of Var1 to "rabbit":
activedocument.Variables("Var1").Value = "rabbit"

Update all fields and view their results.
You should see:


Toggle field codes, select the very last DOCVARIABLE  Var1 field and toggle only it.
It is still "dog".

Even if you select that field and update it specifically (rather than as part of a larger selection), it remains "dog".

You can see the problem as well by changing bVar1 to "false" and then changing Var1 again.
Now the second-to-last DOCVARIABLE  Var1 field will be outdated.

I may be able to work out some logic for ignoring fields that don't directly impact the displayed value in my check.
But that seems like a long way to go for what should be a relatively simple process.

Can anyone propose an alternate solution? Or perhaps replicate/not replicate my results? 


Anwsers to the Problem Bug with nested Docvariables updating?

Download SmartPCFixer for Free Now

Check if there are memory problems

Memory management issues can also cause a BSOD in Windows 7. Thankfully, Windows 7 has a Memory Management Diagnostic tool that detects and solves problems related to system memory.

  1. Click on the Start button on the Taskbar.
  2. Type "Windows Memory Diagnostic Tool" or "Memory" (without quotes) in the Search box or,
  3. Click on Windows Memory Diagnostic Tool (in the search results).
  4. Click on "Restart now and check for problems (Recommended)".
  5. The system will restart, and you need to follow the instructions given on the screen.

Another Safe way to Repair the Problem: Bug with nested Docvariables updating?:

How to Fix Bug with nested Docvariables updating? with SmartPCFixer?

1. Click the button to download SmartPCFixer . Install it on your system.  Open it, and it will perform a scan for your system. The errors will be shown in the scan result.

2. After the scan is done, you can see the errors and problems which need to be fixed.

3. The Repair part is done, the speed of your computer will be much higher than before and the errors have been removed. You can also use other functions in this software. Like dll downloading, windows updating and print spooler error repair.

Related: How to Download Toshiba Portege R500 HDD/SSD Alert Utility v. driver,Way to Update & Download Toshiba Satellite A355-S69403 Motorola Modem Region Select Utility v. driver,Where to Download Toshiba Satellite L305-S5926 HW Setup Utility v.2.00.11 driver,[Solved] Download Toshiba Satellite L675-S7115 Laptop Checkup v. driver,Method to Download Toshiba Satellite M645-S4080 Media Controller v. driver,Best Way to Download NVidia GeForce 6100 VGA Driver v.304.51 Certified,How Can You Update & Download NVidia GeForce 9300/nForce 730i VGA Driver v.310.19 Certified,Method to Download NVidia GeForce GT 330M Driver v.340.65,How Can I Update & Download NVidia GeForce GTX 590 Driver v.280.26 WHQL,Method to Download NVidia Tesla C2050 Driver v.319.17
Read More: Troubleshoot:Bulleted Lists Within Word,Troubleshooter of Error: Bluetooth problems in windows 8.1,Bluetooth not stable with Windows 8 & Windows Phone 8 after 8.1 update [Solved],Fast Solution to Error: C:\\ is not accessible after installation of Oracle 10g in C:\\,[Solved] C COMPILERS,All diagnostic tools give 0x800700C1, troubleshooting wizard can't continue,all files try to open with adobe,all icons on desktop have changed to Adobe icon and won't open,All functions of my outlook are working except it will not let me "REPLY" or start a "NEW" email,all f1-f12 shortcuts not work

No comments:

Post a Comment