Normal Topic Mass Update Programming (Read 10023 times)
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Mass Update Programming
Oct 2nd, 2018 at 8:12pm
Print Post Print Post  
I have an LE, Info 1, a regular text field, and I wanted to change it to a text editor LE. I can't do that, so I created a new text editor LE, Info 2 with the idea to mass update all the information from Info 1 to Info 2.

I did a search on all records with data in Info 1 using "/".

I selected Mass Update (Database), then selected Info 2 from the list. I then doubledclicked "Info 2" from the list and it opened the Program Editor. I put in a simple code:

Code
Select All
var vTemp as String

vTemp = Info 1

FormFieldValue("Database", "Info 2", 0, vTemp)
 



I then cilcked "Run", to run the Mass Update.

It was going very slowly so I went away for awhile, I came back after awhile and it was frozen and the Server was no longer open. So, I closed everything out, restarted the Server, unlocked the database, and restarted the Application.

I checked to see if any of the info had transferred over to Info 2 and it had for about 1,000 or so records. So, then I did a search on the remaining records by putting "/" in Info 1, and "=" in Info 2.

The server then disconnected again and closed completely and  but the client was still opened but disconnected until it eventually closed. I found that I could retrieve all those records with data in Info 1 still. However, there was one particular record, I'm guessing the one it got stuck on, that anytime I would retrieve the record it would cause the Server to disconnect.

Is there a more efficient or quicker way to do this? All I want to do is either change Info 1 into a Text Editor LE or transfer all data of Info 1 to Info 2 which is a Text Editor LE. I'd prefer not to bind Info 2 to Info 1 and then delete the element because I don't want to have a lot of extraneous LE's in the application. I'd prefer to do a mass update if that's possible, unless there's a better way.
  
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: Mass Update Programming
Reply #1 - Oct 2nd, 2018 at 8:30pm
Print Post Print Post  
The easiest way to do this is when you add the new Text Editor element to bind it to the Info 1 field. This eliminates the need to perform a Mass Update. Then you can delete the old Info 1 element.

-Ray
  

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



Posts: 173
Joined: Apr 10th, 2016
Re: Mass Update Programming
Reply #2 - Oct 3rd, 2018 at 9:48pm
Print Post Print Post  
But if I then go into "Manage A Database" and run a batch to delete the Info 1 LE, will I then lose the data from Info 2?
  
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: Mass Update Programming
Reply #3 - Oct 4th, 2018 at 5:33pm
Print Post Print Post  
In Manage a Database->Manage Fields, You would be deleting the Info 1 Field not Layout Element. The Layout Element is deleted when you press the delete key with it selected in the Form designer. Since the Info 2 Layout Element is using the Info 1 Field, yes you would be deleting the data if you deleted the field.

You don't need to delete the field. If you wish, you can rename it from Info 1 to Info 2.

-Ray

-Ray
  

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



Posts: 173
Joined: Apr 10th, 2016
Re: Mass Update Programming
Reply #4 - Oct 5th, 2018 at 4:40pm
Print Post Print Post  
Ok thank you, I actually think I found a way to fix the problem too. There is a place where you can change a text field from "single line text" to "multi line text" and that was what I needed to do but didn't see the feature before.
  
Back to top
 
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 107
Joined: Mar 22nd, 2018
Re: Mass Update Programming
Reply #5 - Nov 6th, 2018 at 3:39am
Print Post Print Post  
I have tried to use the @LoadUpdateSpec and @RunUpdateSpec commands to run formulas in a Sub Form.  The @LoadUpdateSpec command works in loading the spec I want, but the RunUpdateSpec doesn't.  I have to use a macro to run it, which may not work every time.

Any way to fix this?
  
Back to top
 
IP Logged