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

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

Recommended Posts

Posted

I have a script that creates an ad-hoc report. Based on global field selections, a user can select what data they want to appear in a report.

It works very well, except in a multi-user environment. If two users try to set the global fields and run the script at the same time, the correct data may not come through.

Is it possible to pause a script if it is being run by another user on the network?

Posted

What do you mean by: "based on global field selections, a user can select what data they want to appear in a report." This could mean several things, and I'd rather not guess.

Two users should easily be able to run the same report. Globals used for setting finds (if that's what you're doing) or as switches for sub-summary choices (and sort orders) are multi-user friendly. So, something else is at work here.

Can you be more specific?

Posted

Here is how i have the basic functionality set:

A layout has checkboxes for a bunch of different status types (based off of global repeating field).

A user selects what statuses they want to appear in a report. The script that generates the report checks if each status type is selected, and if so performs a find for the corresponding value, and sets a flag field with the user account name.

After all status types have been checked a find is performed for all the flagged records, then the report is generated. After running the report, the flags are erased.

When multiple users try this, it seems that the data may only come through for one user.

Hope that makes sense. thanks.

Posted (edited)

and sets a flag field with the user account name.

This is where you may possibly be having the issue. Could you elaborate what you mean by setting a flag field with the account name? Is this field a global as well?

Global fields will be specific the each user's session.

Edited by Guest
Posted

No i dont have it set as global. What i am trying to do is just flag all the records that should be included in the report for that instance that it is run. It seemed to work well, but when i tried it with another user, the data only got pulled in for one of us.

Maybe there is a better way to create ad hoc report options?

Posted

There are multi-user friendly methods to flag records, and a search on this site will find them, but I don't understand why you need to flag a record.

It seems that you've built a find interface. The user sets globals, then these values are used to perform a find. Can you confirm this?

Why does a record need to be flagged? Typically, flagging is necessary when a user is picking from a list of records which doesn't sound like your routine.

Posted

It seems that you've built a find interface. The user sets globals, then these values are used to perform a find. Can you confirm this?

Yes, essentially that is what i am doing. I perform an "If checked, enter find, Set Task Status Field = value" find request for each status. i then flag the results for each one.

I am doing the flagging because i also need to perform a find on a different table which is used to set what higher level groupings should be in the report. Then i go to the report layout and perform a search for those higher level records.

The task status records are shown through a portal, and are self-related by the flagged value to a flagged global calc to Get(account name)

Sorry if i dont explain this well!

Posted

I have this gut feeling that the flag isn't needed.

Have you tried finding the lower-level records (child records, perhaps) and using the go to related records of ALL FOUND to get to the parents?

Then, you're looking at a sub-summary report.

Posted

What i am trying to do is just flag all the records that should be included in the report for that instance that it is run. It seemed to work well, but when i tried it with another user, the data only got pulled in for one of us.

If you are setting fields in the records themselves then you are changing the values for ALL the users.

Instead you should collect the records IDS of which records you want in a global field.

Posted

I still don't see why you need to flag records, unless when you find for the multiple status types, you feel that you need to find status1, flag this found set, then find status2, flag this second found set. Then, to get all your found records, you find the flags. Is this what you're doing? Do you realize that you can do many find requests at once?

Here's a demo. Hope this helps. If not, how about describing your tables and relationships?

Also, here's a thread that has a demo of how to mark records in a multi-user friendly way: Link

MultiFind.fp7.zip

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