I want to look at all Duplicate records. I do not want to delete any of them. It looks like the safest way is to use the Search Mode and the Tree Menu option for "All Duplicates Search".
When I do that manually, it works fine. So now I need to make a button to do that. Normal view is the Button Panel.
Here is the button code that does not work:
//=============================
//Search Duplicates
Var vSpec as String
Var vLoad as Int
Var vTree as Int
VAR vAction as String
Var vMode as Int
//vAction = "Delete"
//vAction = "TempRemove"
If Vaction = "Delete" Then vMode = 1
If Vaction = "TempRemove" Then vMode = 0
//Load Dupe spec "tmpFullNameZip"
vSpec = "tmpFullNameZip"
VLoad = @LoadDuplicateSpec(vSpec)
WriteLn("Spec Loaded is " + vLoad)
vTree = @SelectTreeitem("Search Menu!Search Commands|All Duplicates Search")
WriteLn("Tree Selected is " + vTree)
//DO NOT RUN during this test. Mistake might Delete real records
//If vTree = 1 Then { RunDuplicateSpec(vMode) }
//===================================
I added the WriteLn commands to track prograss. The Duplicates Spec opens fine and I get a "1" returned. But the Select Tree command returns a "0"
So, What is wrong with this code?=====================
I thought maybe its because I am using Buttons, so I would set up the Tree View. I made two buttons to Toggle Tree/Button views.
Here is the Tree View Button code:
ButtonPanel(0)
Visibility(cmdShowButtons,1)
Visibility(cmdShowTree,0)
ForceRedraw()
//This works good
//==================================
That works good. Tree opens and button disappears.
And here is the Button View code:
ButtonPanel(1)
Visibility(cmdShowTree,1)
Visibility(cmdShowButtons,0)
ForceRedraw()
//This kills the tree view, but has blank white area and NO BUTTONs.Difficult to get them back.
Again, what is wrong?I could work with either method, but cannot get any to work. What am I doing wrong here?
(PS:I have a third option, to add a Button to the Button Panel, but that does not work either. I will put that in a separate posting.)