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

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

Recommended Posts

Posted

Is it possible to make a script excecute when a record is deleted and/or created without creating a button. Greatful for help with this matter !

PS. I use FM version 6.

Posted

Portals definition and cascaded deletes, can often be made into being helpfull if you hessitate taking the plunge into a plugin.

But we need to know a little more 'bout the scripts tasks before answering? ....If say you need to evaluate that all fields have been filled in a form, could it be done by utilizing this tecnique:

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

...where the Count( ability to take several fields as argument can be used.

--sd

Posted

Thanks Soren for your reply. Well... before a record is deleted a text in a field ought to bee put into a global field. After that it´s all right to delete the record. If I do this with a button the script looks like this:

Set Fileld ["serialKopID", "serialKopID & ", "& kopID"]

Delete Record/Request[]

kopID is a field with the text I need to "paste" after the information in the global filed serialKopID. After that the record will be deleted.

I need the same thing to happen even if the user uses "Delete record" from the menu or from a webinterface.

Any ideas, please... ?

Posted

It is still too abstract, what is the purpose of storing it in a global field, when it's deleted. I would guess this has something to do with availiable items in a storage and their allocation into an invoice. Now if this is the issue?? Is it not necessarily the right way to do it, because the attribute of being sold could be just be an attribute to the record.

--sd

Posted

Thank you Soren for your patience... The situation is as follows:

I needed to generate unique serial numbers in a limited range (lets say 100 -999). Since the range is limited it is important to be able to reuse deleted serial numbers. Let´s say record 1 in a database gets sn. 100, record 2 gets sn. 101 etc. If I delete record 1, sn. 100 ought to be free to use... that´s where the script above comes in. By "saving" the serial numbers in the global field serialKopID and making sure to put back the serial number before deleting a record I always have 900 numbers available. -Now I nedd to get this to work, not only from a button, but also when using "Delete record" from the menu.

Posted

It doesn't help you much that, such things can be made purely by autoenter values in post fm6 versions - however will you be able to use the Example 2 technique shown here:

http://www.kevinfrank.com/download/multi-gtrr.zip

...although it will require some thinking to make this happen in the assignment of serial numbers is it posible!

But beyond that could you remove the ability to delete anything without using a button, in the privileges setup. Serious developers will even try to pursuade you into making it imposible to use anything but what the developer intended. No shortcut keys without serious remapping and neither unscripted navigation nor creation/deletion of records without full script control.

--sd

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