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

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

Recommended Posts

Posted

This might be really obvious to some of you but I am really stumped - I have a found set, say 20 records from a DB of 100, and I am looking at them in List mode. I want to have a single button in the header or the footer that will populate a currently empty text field with a common piece of text in ALL of the found set. I cant use a global because I only want to populate the found set and so far I have only managed to populate one record at a time.

Is there a way to populate ALL of the Found Set ONLY in one action?

Posted

Hi wjmartin,

You need to loop through your found set. Something like:

Freeze Window

View As [ Form ]

Go To Record/Request/Page [ First ]

Open Record Request

Loop

Set Field [ ... whatever you wish ... ]

Go To Record/Request/Page [Exit after Last; Next ]

End Loop

View As [ List ]

LaRetta

Posted

If I knew that many simultanious users wouldn't disturb each other, wouldn't I hessitate using a scripted Replace, what LaRetta misses in her solution is to decide what to do with locked records.

Since you're on a mac could, an applescript where you

set field x of window y to z

...be utilized as well, while still having the record locking issues in mind!

Another thing is that you problem gives witness of a structural problem, which very well might be solved by a proper relational definition! Which I under the circumstances can't say ...if they are, but my hunch tells me so!

--sd

Posted

Thanks for the feedback guys!

Soren " ...structural problem, which very well might be solved by a proper relational definition..." - it might just be language difficulty but I dont understand this part?

Posted

Setting data in a field through a set of found records (using whatever means) in no way implies structural problems, Soren, and nothing in the opening thread indicates it would. I'm curious why you think he has structural problems?

But you are right in that I should have inquired whether it was multi-user. I've ignored Replace Contents in multi-user in the past ... old habit. It was my impression that working on a found set and starting with Open Record Request to simply set a field would not cause the Set Field[] to fail if the record was currently locked elsewhere. In fact, I'm unsure if the word LOCKED means the same thing in vs. 7/8. I admit to being quite tired when this was discussed before and it's on my 'heavy study' plate but that was my understanding of it (it was a long, complex thread). Thanks for the reminder to review those issues. :wink2:

L

Posted

LaRetta - Thanks - your solution worked perfectly - as it happens, this task is an occasional housekeeping task so I will ensure there are no other users live when I run it

- as an aside, I was going to use "Sneaker-Kick" to remove my users before running this task (Sneaker-Kick = walk round and kick them out) but is it possible to automatically kick them out as part of my script?

Posted

Setting data in a field through a set of found records (using whatever means) in no way implies structural problems, Soren, and nothing in the opening thread indicates it would. I'm curious why you think he has structural problems?

Creating deliberate redunancy, is what I call iffy ...when it isn't the keyvalues the script works on. Even if it really is the key values we're dealing with, will the addition of a new index burden a solution ...when it can be done neater with this:

http://www.filemakerpros.com/GetNthRecordTAIL.zip

The way I came to think of it, was this phrasing:

Designing your databases correctly can make the difference between slow-running, complicated code and software that's speedy, modular, and easy to work with.

From this synopsis/review: http://www.amazon.com/exec/obidos/tg/detail/-/0201752840/qid=1129815933/sr=1-2/ref=sr_1_2/104-1637528-3449538?v=glance&s=books

...a book I seriously considers to buy!!!!

--sd

Posted

He is not setting redundant data from my perspective!

... that will populate a currently empty text field with a common piece of text

Like assigning a Sales Person or specifying a group of letters for follow-up. There is no indication that he is setting a field in another table or creating related records (or even keys). He might be setting a field of those he wishes to invite to a meeting! Fields in databases are MADE to be set with data by the Users, Soren, that is their purpose. And setting groups at a time is commonplace, as well as expected. :wink2:

LaRetta

Posted

And setting groups at a time is commonplace

Yes in systems that can't show up with relational behavoirs, found sets is way too far into relational theory, actually is theory of sets as such the basis. I would say, do gather the keys instead of littering the database with utility fields... or use this:

http://www.sumware.net/robfm/savingfoundsets.php

or

...one of the methods in JMO's template I mentioned in my previous post.

If you were to program in a dedicated lowlevel tool as C++ and as homework in an educational institution delivered a solution using flagging as this is called or global fields for that matter, would you recieve critical markings for not using the header properly.

--sd

Posted

Woa Woa Woa - Guys!!!

I just wanted to add a common attribute to some of my records in a simple and flexible way - I am not trying to create a new philosophy here - I just want to label a few records so I could regroup them later.

Input much enjoyed and appreciated tho - thanks

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