Normal Topic Finding Duplicate Records (Read 6523 times)
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Finding Duplicate Records
Mar 28th, 2021 at 5:21am
Print Post Print Post  
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:
Code
Select All
//=============================
//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:
Code
Select All
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:
Code
Select All
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.)
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Finding Duplicate Records
Reply #1 - Mar 29th, 2021 at 2:10pm
Print Post Print Post  
Hello,

The correct path for that Menu Tree Item is

Code
Select All
Search Menu!Search Commands!All Duplicates Search 



You have a | instead of a ! in your code.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Re: Finding Duplicate Records
Reply #2 - Mar 29th, 2021 at 5:42pm
Print Post Print Post  
Well, that was an "EYE Opener" Roll Eyes

Now, can you also recommend a good optometrist?

Thanks, Ray.  Too many hours on this, aargh!
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Finding Duplicate Records
Reply #3 - Mar 29th, 2021 at 7:15pm
Print Post Print Post  
I don't know a good optometrist but if you right click in the Programming Editor and choose List Browser and then the Switch button 3 times, you'll get to the list of Menu Tree Items. Double-Clicking on one of them will insert it into the programming where the cursor is at. Saves you having to type things in with the exception of items in square braces. Things like [APPLICATION], [DATABASE], etc. will need to be replaced with your actual Application, Database, or whatever name.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged