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

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

Recommended Posts

  • Newbies
Posted

I've searched online and haven't found the answer to this question. I think it's pretty simple, so I may just be using the wrong terms to try and find the solution. My apologies in advance if this is repetitive.

I'm working on a rental system. One of the layouts allows the user to edit invoice details, including adding extra line items to an invoice. The line items are displayed using a portal. I use a plus-sign image as a button to add additional line items. The button calls a script that opens a new window and displays a layout with the additional inventory that is available on that day, then pauses excecution. In browse mode I use another little image next to each record as a button that resumes the script. The script then uses the ID of the record that was just clicked on to perform some additional action.

My problem is that I would like the user to be able to use Find mode to display a subset of available inventory, and then click on the button to choose the correct item. There may be 1000 different items in the inventory, and so browse mode is going to be cumbersome. I thought that I could just have the user switch to find mode after the script pauses, or tell the script to enter find mode before pausing, but in those cases clicking on my resume script button doesn't seem to continue the script and return the ID of the selected record as it does in browse mode.

I look forward to any suggestions,

--TWH

Posted

I think you need to turn this problem on its head.

Remember that a table on your relationship graph represents a found set. I would create a separate instance of your inventory table on the graph say "inventory_lookup"

You would then have some search fields on your invoice layout i.e. "ZipCode" that were related to your "inventory_lookup" table. In your new window rather than displaying all the inventory. You would display a portal to the "inventory_lookup" table that would only show the related records that had the same zip code.

Posted

I've searched online and haven't found the answer to this question. I think it's pretty simple, so I may just be using the wrong terms to try and find the solution. My apologies in advance if this is repetitive.

I'm working on a rental system. One of the layouts allows the user to edit invoice details, including adding extra line items to an invoice. The line items are displayed using a portal. I use a plus-sign image as a button to add additional line items. The button calls a script that opens a new window and displays a layout with the additional inventory that is available on that day, then pauses excecution. In browse mode I use another little image next to each record as a button that resumes the script. The script then uses the ID of the record that was just clicked on to perform some additional action.

My problem is that I would like the user to be able to use Find mode to display a subset of available inventory, and then click on the button to choose the correct item. There may be 1000 different items in the inventory, and so browse mode is going to be cumbersome.

This part doesn't make any sense. Find mode does not show data. Find Mode lets you choose what records will be displayed in Browse mode, which is where you end up after performing the Find.

  • Newbies
Posted

This part doesn't make any sense. Find mode does not show data. Find Mode lets you choose what records will be displayed in Browse mode, which is where you end up after performing the Find.

I understand that Find mode returns you to browse mode with the new found set. The problem is that, if I execute my script, which shows the records in browse mode and then pauses, I can click the button to resume the script and everything works. However, if I start the script, then switch to Find mode and do the find, I can no longer resume the script. I think that switching modes terminates the script. Is that correct? Is there a way around this problem? I want the user to be able to switch to find mode and then resume the script after finding the appropriate record.

--TWH

Posted

I want the user to be able to switch to find mode and then resume the script after finding the appropriate record.

A better way would be for the first script to find the record, then run *another* script.

Re-reading the original post I'd suggest you try displaying the available inventory in a portal, and avoid find mode altogether. This portal could be user-filtered to reduce the items listed at any one time.

Posted

I understand that Find mode returns you to browse mode with the new found set. The problem is that, if I execute my script, which shows the records in browse mode and then pauses, I can click the button to resume the script and everything works. However, if I start the script, then switch to Find mode and do the find, I can no longer resume the script. I think that switching modes terminates the script. Is that correct? Is there a way around this problem? I want the user to be able to switch to find mode and then resume the script after finding the appropriate record.

--TWH

If you have Filemaker Advanced, you can change the Find menu item so that when triggered, it does NOT abort the running script. Alternatively, you can place a Find button on your layout and attach it to the action Enter Find Mode. Somewhat surprisingly, this acts different: it enters find mode but does not abort the running script.

Then your script will have to have a find mode handler after the pause:

Pause

If[ get( windowmode) = 1]

perform find

End if

Continue other after-pause script actions.

Posted

Not sure if this will help, but when entering find mode, insert Pause/Resume script with the default "indefinitely". When the user hits enter to accept the find, the script resumes.

I found this post when trying to figure out how to get a script to open a layout based on the results of whatever is entered in find mode, so it worked for what I was trying to do...

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