Jump to content

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

Recommended Posts

Posted

Hi,

I would like to have a calculated field (count field) in a table which increments automatically if a user (user field) enters a record. So some sample data might look like the following:

User, count, other stuff

------------------------

JOE, 1, otherStuff

JOE, 2, otherstuff

JOE, 3, otherstuff

SALLY, 1, otherstuff

The next time JOE creates a new record I would like the count to be automatically set to 4. If a new user, FRANK, enters a new record, I would like it to automatically default to 1.

Regards,

Zenon

Posted

What if Joe deletes a record (that he didn't create)? I'm too tired to think of other gotcha's, but I would imagine that your requirement might be solved in a more direct way if we knew why you felt that you needed this incrementing field. Could you elaborate on the business requirement?

Posted

Hi,

The requirement is that each user identifies each record (in our case a slide) with an identifier, unique for the user (the combination of user and count is unique). I can make the "count" field user entry, but it would be better for the user if the field was populated automatically.

I don't really care if a user deletes a record, as long as the "cont" field is unique for the user.

Thanks,

Zenon

Posted

Why? To what purpose must a user identify each record?

My thoughts:

1. You're looking to establish some sort of security model whereby a user is only able to view "his" records.

2. You're tallying the number of records a user has created. By the way, you don't mention a User table or the fact that you might be populating records with an auto-enter gUserID.

3. You aren't aware of auto-enter increment serial numbers.

4. You're merging data from several off-line files.

So, please tell me your goal, because describing a technique in the dark, so to speak, might do you a disservice.

hth,

Barbara

Posted

Sure, I'll try to explain... I'm very new to FM more familiar with other db - trying to learn.

[color:green]My responses are green

1. You're looking to establish some sort of security model whereby a user is only able to view "his" records.

[color:green]Yes, most of the time users only want to view their own records. Occasionally they will need to view all records or a list of records other users records

2. You're tallying the number of records a user has created. By the way, you don't mention a User table or the fact that you might be populating records with an auto-enter gUserID.

[color:green]Yes again, we would be auto-populating the user with the userId.

3. You aren't aware of auto-enter increment serial numbers.

[color:green]Well, I thought that the increments are general and not user specific. Can you create a increment that is user specific( without creating a separate increment for each user). We do want an increment as the primary key, but also want a way to segregate the data by user

4. You're merging data from several off-line files.

[color:green]No, the users are putting in their info manually

Regards,

Zenon

Posted

You really didn't answer my question. Why must you have this user-specific incrementing count?

Posted

Well, I don't really need to have this field auto populated. We could let the users enter in a unique identifier for each user/slide combo. I thought that there may be an easy way to automatically do this as a convienience for the users. If not, we can use the workaround.

Thanks,

Zenon

Posted

I'll stop asking why this is needed since you don't seem to want to explore the goal of this requirement.

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