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

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

Recommended Posts

Posted

My brain is scrambled.. so someone please set me straight...

I have four buttons. each button represents a piece of equipment. When a user clicks on a button for a particular piece of equipment it will show all of the jobs assigned to that piece of equipment..great! the user then has the ability to select a date to see jobs which are assigned to the equipment. This is done through fourteen buttons, each has a date (starting today) for the next fourteen days. I do this through find statements....

for example, when the user clicks on the equipment buttons: set field, "equipment a" etc. This works fine and shows all jobs for equipment a. Then, when the user clicks on a date, I have a find where it constrains the found set and show jobs just for a particular day. This is where I am having trouble... the only way a user has the ability to click on multiple dates for a piece of equipment is to have the user click on date 1 and it will show all jobs for date 1. I then have a pause in the script so that when they hit continue it will go back to showing ALL jobs for the piece of equipment through the original find script for equipment a. Then they select another date and go through the same process

How can I set this up so that when all jobs for a piece of equipment are listed, that the user can simple a date button and it will show date 1 jobs and without any pauses, they can select another date and it will check all of the jobs for equipment and show only date 2..

thanks

Posted

...or - notwithstanding Andy's last suggestion - since the 'constrain' option essentially adds criteria to the pre-existing find, you could script the outcome you want without the use of globals by using the 'Modify last find' script step.

The 'Modify last find' step will reinstate the criteria from the immediately preceding search, so the scripts attached to your fourteen 'day' buttons will then need to clear the date component of the search and replace it with calculated criteria which match the button designations.

Posted

I hope I understand this correctly.. so I will restate it..

you are saying that if I do a find for a piece of equipment and it shows all of the jobs for that equipment, I then selct a button which shows a particular day (in the next two weeks), that the "modify find" would revert the find data back to the find where it showed all jobs for that piece of equipment (i.e. one find back)?

If this is the case then I may have another issue. Again I have 14 button each represents a day in the next two weeks. If a user wants to seek what jobs occur next thursday, they click on the appropriate date and all is well.. If they wanted to click on next Monday to see jobs on that ame piece of equipment you "modify find".

I am a little unclear...

thanks

Posted

What I was saying is that "Modify Last Find" will reinstate the last find in its entirety, thus when you have just found all the jobs for a particular piece of equipment. Modify... will reinstate that find request so that it can be modified.

The idea is that once the script has reinstated the find, it can go on to add a date criterion.

When the user clicks a different date button, the same thing will happen - the last find (with both equipment and date criteria) will be reinstated, but the date criterion will be overwritten with a new date corresponding to the new button clicked.

The effect will be that in a single step, clicking a new button will find a different day's jobs for the same equipment item.

Posted

I did understand it correctly.. so I must have messed up the syntax

for example in button one

Enter Find Mode

Set Field [mydate, today]

set error capture [on]

Perform find [replace found set]

so would button 2 be

Enter Find Mode

Modify last find

set field [mydate, today +1]

perform find

This I tried but it does sem to work

thanks

Posted

Hi,

'Modify Last Find' has no meaning when it comes after the 'Enter Find Mode', as 'Enter Find Mode' clears the previous find criteria.

To make it work correctly, the script for button one will be:

Modify Last Find

Set Field ["mydate", "Status(CurrentDate)"]

Perform find [replace found set]

...which will add the current date criterion to the already existing equipment find criterion (from the previous step).

The script for button two will be:

Modify Last Find

Set Field ["mydate", "Status(CurrentDate) + 1"]

Perform find [replace found set]

...which will replace the date criteria of the previous find (or add a date criterion if it is the first button clicked).

Similarly, the script for button three will be:

Modify Last Find

Set Field ["mydate", "Status(CurrentDate) + 2"]

Perform find [replace found set]

...and so on through to button 14.

When this is in place, it will not matter which of the fourteen buttons is clicked first. Clicking any button will filter the current equipment list to show only records for the corresponding date.

Posted

Thanks, worked great...

However, I have a button that finds two pieces of equipment via

set field A, Data A

new record/request

set field B, Data B

perform find

This finds data for two similar pieces of equipment for one operator to show on one schedule..

When I use the Modify last find in this case, it does not work... any insight on this?

thanks

Posted

Yes, to deal with more than one equipment find request, you'll need a couple of extra lines of code in each of the fourteen scripts, viz:

Modify Last Find

Loop

Set Field ["mydate", "Status(CurrentDate)"]

Go to Record/Request/Page [Exit after last, Next]

End Loop

Perform find [Replace Found Set]

...and for button two:

Modify Last Find

Loop

Set Field ["mydate", "Status(CurrentDate) + 1"]

Go to Record/Request/Page [Exit after last, Next]

End Loop

Perform find [Replace Found Set]

...and the script for button three will be:

Modify Last Find

Loop

Set Field ["mydate", "Status(CurrentDate) + 2"]

Go to Record/Request/Page [Exit after last, Next]

End Loop

Perform find [Replace Found Set]

etc though to button 14

This will work as a 'filter' for any number of find requests from one to infinity.

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