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

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

Recommended Posts

Posted (edited)

Wow!, I think after posting this, and rereading the script section of my book, I may have just completed my first loop without getting stuck. This is a great day, drinks are on me!!!

If I wanted to set my feeding date field on 50 records would I have to do a loop of some kind?

Or is there an easier way to go about it. as I have yet to complete a successful loop (I keep getting stuck and have to ctl alt del)

Jim

Edited by Guest
Posted

You can also look into the Replace Field Contents script step.

Posted

set my feeding date field

Out of curiosity what is this, it seens suspiciously being of some sync'ing nature?

--sd

Posted (edited)

Out of curiosity what is this, it seens suspiciously being of some sync'ing nature?

--sd

I have a db for our K9 unit, one of the things they track is the feeding day and time of the dogs.

You would think that the dogs would all be fed at the same time on the same day…but, the trainers have their system that feeds the dogs at different times on different days. Apparently they do not all play well together.

What they wanted was a way to set the feeding date and time across the db. So when they start playing well together and do actually feed them as a group they do not have to go to each record to set the date and time of the feeding.

That is what I was attempting to do with the loop that I kept getting stuck in.

Just a quick note before anyone asks why we have 50 K9’s.

Trainers and Handlers are two separate functions.

We have one of the top trainers in the nation at our department and he trains K9’s for other agencies in the USA, so it is not uncommon for him to have a number of dogs being trained by his people.

He tracks all these animals through the db at work as he also maintains our K9’s with the other animals.

A handler is the Patrol Officer who only has one K9 assigned to him.

Our agency only has four working K9’s at any given time.

Edited by Guest
Posted

So it should act as a stamp of done duty, is this always the same set of 50 or are some exempt at times ... what it sounds like is that you perhaps should have a key field locking to a feeding time, which then is just one single field in a many2one relation. Could each dog be assigned to regularity or this a daft wish?

--sd

Posted

Yes it is a stamp of done duty. The set can change for numerous reasons, and the request to set all the same date/time would only occur sporadically, but it does occur.

At a point in time each dog does have a regularity assigned, but it comes in latter phases of training as the dog matures through the process.

Posted

But it can be structured by changing these singled out dog's Relational key when their needs change. What I suggest is not writing the time stamp more than once, and each sharing key value will see this ... now admitted are 50 a lot, but tagging each record with a field which each of them should be updated is at least relational unhealthy ... use the key field to put each dog in a group with the same treatment, if a dog needs something beyond that make a new group and assign the to that one as well via pilcrow delimited field containing each groups ID.

--sd

Posted

Wow!, I think after posting this, and rereading the script section of my book, I may have just completed my first loop without getting stuck. This is a great day, drinks are on me!!!

If I wanted to set my feeding date field on 50 records would I have to do a loop of some kind?

Or is there an easier way to go about it. as I have yet to complete a successful loop (I keep getting stuck and have to ctl alt del)

Jim

Loops are extremely simple. The best thing to do would be post a clone of your file. Next best, post the actual text of your script.

This topic is 5601 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.