Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Clear Fields in ALL records


This topic is 7846 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have used the ScriptMaker to clear 4 fields in a layout using the "Clear" script. This is working fine but I need a way to press a button to clear the four fields for ALL records, not just the current record being browsed.

Any ideas?

Link to comment
Share on other sites

First either show all records, or find particular set you want to work on. the following script will loop thru the found set performing whatever steps you place just below the Loop step. Be carefull with this kind of loop, back up first, there is no undo if you mess up. I would recommend first writing the script without the loop steps (Loop,EndLoop), try it on a single record, if it works to your liking then put the loop steps in.

Goto Record/request/page [first]

Loop

---put your steps here----

go to record/request/page [exit after last,Next]

End Loop

Rod

Link to comment
Share on other sites

Hi,

Yes, it's quicker. While being in the field, using the replace function would replace the actual content (empty if cleared previously) in all records.

Show all records

Go to Layout

Go to Field (select)

Clear

Replace (no dialog)

Go to Field 2 (select)

Clear

.....

Fo to Field 4

Clear

Back where you where.

Link to comment
Share on other sites

I've started using looped Set Fields instead of Replace recently. I have a feeling it's faster but not sure -- it's definately not slower.

I recently spent half a day improving a complicated process that involved four looped Set Fields with (each Set Field looped through the found set individually) with one loop with the four Set Fields inside it, thinking it'd speed up the process. It made no difference (in fact the whole process was 5% slower!).

I don't like having a process rely on being on a particular layout with particular fields on it if at all possible.

Link to comment
Share on other sites

Hi Vaughan,

Here was the thread. Not involving replace function but Copy All records though...

Pupiweb said

"Actually I usually opted for a looping script putting the IDs in the global (because it's not layout-dependent and doesn't require that the user has export privileges) but I discovered it's much slower (5 times slower) ..."

I finally run the test in my line item (8,264 records linked to many db) with a new field and a g_starthour and g_endhour in the script.

The delay result is B)

Replace function : 00:01:24

SetFieldLoop : 00:02:50.

Not 5 times, but twice quicker with Replace.

Link to comment
Share on other sites

RE Vaughan's: I don't like having a process rely on being on a particular layout with particular fields on it if at all possible.

That is definitely *best* practice, no doubt about it.

IMHO and without test -- replace will be faster, but the field *must* be on layout and accessible.

Link to comment
Share on other sites

Hi Vauhan,

It's a 18,8Mo file and a line item related to 14 db!!!! If you have a ftp, I could upload it to you. In the meanwhile, here are some system information.

Running on Imac Mac OS 8.6 3go/96Mo (first IMacs).

Really want to try it ? Would you think this kind of stuff would change (reverse) according to the system running ?

Link to comment
Share on other sites

This topic is 7846 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.