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

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

Recommended Posts

  • Newbies
Posted

Hello Folks!

I came back from DevCon very enthusiastic with my iPad and FileMaker Go.

I wrote a custom function that I thought would be a great time saver. It returns if the Ipad or iPhone is in portrait or landscape mode (it can be downloaded from http://www.solucionesfilemaker.com/demos.html)

The thing is that now I want to attach a script trigger to the function and it does not work :) On objectModify does not work at all.

Any ideas?

Best Wishes,

Diego D'Alessio

Buenos Aires - Argentina

(the southernmost FileMaker Developer of the world?)

Posted

You are leaving out important information.

You do not attach a script trigger to a function - you attach a trigger to a layout object and you designate a script that will be performed.

What object did you attach the script trigger to?

What user action modifies this object?

What does the script look like?

Do you know how to use script triggers?

Can you post a copy of your file?

  • Newbies
Posted

Hello Bruce!

The function is called from a calculation field and yes, I've been using script striggers since day 1.

The .fp7 can be downloaded from www.solucionesfilemaker.com/demos.html

Thanks!

DD

Posted (edited)

Hello Bruce!

The function is called from a calculation field and yes, I've been using script triggers since day 1.

The .fp7 can be downloaded from www.solucionesfilemaker.com/demos.html

Thanks!

DD

But you did not answer most of the questions.

The script is never called by anything.

The script has an additional problem; it tries to change the value of a calculated field.

There are no script triggers in your file and there is no object which has an "OnObjectModify" trigger attached to it.

Edited by Guest
Posted

Bruce is right, you've got a function, being evaluated in a conditional formatting calculation box.

I don't see how you're using this function to trigger a layout change.

And I don't see how you can trigger script that calls this one a device orientation change.

Posted (edited)

Hello, at www.solucionesfilemaker.com/downloads/rotate-2.fp7 there is the script attached to the field.

Best wishes,

DD

You can suppress the error with an exit script [ false ] statement.

You can trigger it by trying to type in the calc field; but it still isn't clear what you're trying to do.

You state "You can use this function , for example, to switch layouts via script triggers." but that isn't true. Or - to be more precise - the layout switching cannot occur if the only thing the user does is change orientation.

We do not have a native script trigger for window changes so nothing except conditional format appearance of the text is going to happen if the only thing the user does is rotate the device.

Edited by Guest
  • Newbies
Posted

You can suppress the error with an exit script [ false ] statement.

You can trigger it by trying to type in the calc field; but it still isn't clear what you're trying to do.

You state "You can use this function , for example, to switch layouts via script triggers." but that isn't true. Or - to be more precise - the layout switching cannot occur if the only thing the user does is change orientation.

We do not have a native script trigger for window changes so nothing except conditional format appearance of the text is going to happen if the only thing the user does is rotate the device.

Gee... So the answer to my question seems to be "yes", I wrote an almost useless function.

I assumed that, as the content of the field changes I was going to able to attach a script , 'onObjectModify' and voilá, Change to x Layout.

But, as ObjectModify does not works with calculation fields, the end goal of my function will be almost impossible to achieve.

Thanks Bruce!

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