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

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

Recommended Posts

Posted

Hello everybody!

I have a problem with using EventScript for validation calc. On my machine it works fine, but when I put an application on customers machine, validation failed.

I have a few similarly fields for validation. EventScript does not recognize a valid script parameter in triggered script. When I turn on debug, I saw that problem is on script parameter. EventScript, always takes a ScriptParameter for previous field.

On both machine is FileMaker7, runs on Windows XP.

Any suggestions?

TIA

Posted

Hello everybody!

I have a problem with using EventScript for validation calc. On my machine it works fine, but when I put an application on customers machine, validation failed.

I have a few similarly fields for validation. EventScript does not recognize a valid script parameter in triggered script. When I turn on debug, I saw that problem is on script parameter. EventScript, always takes a ScriptParameter for previous field.

On both machine is FileMaker7, runs on Windows XP.

Any suggestions?

TIA

Posted

I'm not sure to fully understand the issue, but here's some hints.

When using validation options on a trigger field (of type : text, number, date, time, timestamp or container), you should provide your validation results to FileMaker.

Because FMPro is waiting for the permission(or the non-permission) to let the current user commiting changes to the contents of the watched field.

So, as you can read at the buttom of the validation dialog box, you must provide a non-zero value to tell that it is correct to commit the field and then trigger a script by the same occasion. Your calc should looks like :

1 & eventscript(Get ( FileName ) ; "PickUpProducer"; product_one )

Second hint : The evaluate function can be useful to pass the actual product_one contents when this field is changing. If the first hint doesn't fix your problem, then look for this function in the FMPro's help and take attention to the second parameter that this Evaluate function can accept. wink.gif

Last hint : We recently offer a new demo-fp7-file to demonstrate some secondary usages of EventScript. I think it looks a bit like the functionality you are trying to implement in your solution. Go to http://www.softs4humans.com/FMPro_Plugins.html and download the S4H_QuickJumpMenus demo file. It is using value list to trigger scripts. smile.gif

Posted

I'm not sure to fully understand the issue, but here's some hints.

I'm familiar with first 2 hints. I've fixed my problem, with:


Go to Previous Field

Set Field [table::gScriptParameter; Get(ActiveFieldContents)]

Commit Records/Requests

     [ Skip data entry validation; No dialog]

Perform Find/Replace [ table::gScriptParameter;Find Next]

If [table::gScriptParameter=product_one]

Set Field [table::producer_one;Appropriated producers::producer]

Else If.....

It works fine. But why my firs solution work on one machine, and don't work on second machine?

Posted

I really don't know why it's working on one machine and not on the second... That's the first time I heard about a phenomenon like this.

Since you have to use the

Set Field [table::gScriptParameter; Get(ActiveFieldContents)]

to capture the actual contents of the previous field, it looks like an issue related to the speed of the CPUs or maybe a different behaviour caused by differents hardwares or differents softwares between these 2 computers.

Are both computers PCs? with the same operating software? with the same software revisions? with the same setup and regional settings?

Of course, the plug-in file is installed on both computers !??

To be honest, if something is working on one standard computer then it should run exactly the same on every other FMPro clients(including kiosk and runtime). But you have to understand that EventScript is depending on FMPro itself to be invoked and then to trigger scripts. If FMPro doesn't invoke the calculation correctly, then the plug-in can't do his job. frown.gif

A last hint, maybe the "Let function" can be useful for you implementation !??

HTH

  • 2 weeks later...
Posted

Since you have to use the

Set Field [table::gScriptParameter; Get(ActiveFieldContents)]

to capture the actual contents of the previous field, it looks like an issue related to the speed of the CPUs or maybe a different behaviour caused by differents hardwares or differents softwares between these 2 computers.

Get(ActiveFieldContents) solved my problem, and it works fine.

When problem was come upon, thought on speed because customers machine has very slow CPU. Thought that because off speed, Event script can't read properly script parameter. But when I go step by step trough debugger, behavior of app. was the same; speed is not important when debugger is on, wright?

Are both computers PCs? with the same operating software? with the same software revisions? with the same setup and regional settings?

Of course, the plug-in file is installed on both computers !??

Regional settings are not the same, but the rest of things are.

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