Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Greetings Fellow FileMakers -

I have a field, call it Field1, it's a Container Field (albeit, the same thing happens with a text or any other type field...). When I turn that field into a button, and attach a script to it to look at itself - it doesn't see the data (I run a Show Dialogue after Get(ActiveFileContents) it shows nothing) (or I Set some other field to it and nothing shows up...). I subsequently noticed that there are two tab numbers attached to each buttion field in the layout.... hmmmmm. Side point: If I make one of the two (the first) buttons active from a tab perspective, it seems to get the field contents. When I make both, neither or the second tab only active, it does NOT get the field contents... not sure what is going on with tabs...]

Anyway, what I WANT is to toggle a container field back and forth with an on and off image, but I first must test for what is there to put the other one there... How do I get what is there to test? I can hardwire it for each field I want to do this with and it works. But I want to make a single script that will test the button I am currently pressing, pass that variable to the script, test it and bring back the appropriate icon (image - actually, a green on button or a red off button). I have 50 buttons on the layout so I don't want to write a script for each button (and a button is a container field1 through container field50).

The Logic part seems to work - even with a container comparison! it's just getting the data in and out that I'm having trouble with...

If[Table::ContainerField1 = Table::RedButton]

Set Field [Table::ContainerField1; Table::GreenButton]

Exit Script

End If

If[Table::ContainerField1 = Table::GreenButton]

Set Field [Table::ContainerField1; Table::RedButton]

Exit Script

End If

I can test container fields fine.

Any thoughts on geting the data from the field with a button on it?

Thanks in advance,

Royce

Posted

Only if the Table::GreenButton or ::RedButton are globally defined can you expect correct behaviour sans relational links with according ID's primary as well as foreign.

The usual way is btw to have one single global repeating containerfield which you then can use all over the place via:

http://www.filemaker.com/help/FunctionsRef-338.html

....via a field recieving numbers to pull the correct one. However is a neater tecnique to fill or build a button with stings of unicode chars in mergefields - because it then is based on the operating system behind each client tool instead of a value stored on server side of the matter - gives less chatter in the network.

But the newest tecnique is to preload all these images references into $$variables in the init-scripting.

--sd

Posted

Hey - I like ABS technique...that was smart...

I can do these things okay - the trick is passing WHAT field I am clicking on to the script....how to grab that info... (ActiveFieldName)...It doesn't want to give the name from the fieldthat is also a button.... and I have 50 field/buttons to choose from, yet use the same script... Does that make sense? Am I being clear or muddy...

Thank,

Royce

Posted

You can't so it the way you describe. When the field is a button, it doesn't activate. I am not sure what purpose do 50 on/off buttons serve, but perhaps you could use repeating fields here. Then you could pass the repetition via script parameter (you would still need to define each button separately, but the script would be the same).

Posted

Hello Michael -

I am laying out an anolog Mixing console for people to keep settings visually for manual recall (they do not have a digital console).

I got it to work sometimes....field will activate when I only set the first Tab Order button (which activates the field...) but not always...

Maybe I can better do it with a custom function...

I do agree with you about being able to do it...but something tells me there's a way...it's that feeling you get when you just can't let it go.... Royce

Posted

I didn't say it couldn't be done - just not the way you describe. So what are these 50 settings? Is it just 50 channels mute on/off, or are there multiple buttons per channel?

Posted

25 buttons per channel...usually 24 - 56 different channels. Each channel is a Record...all the settings are stored in fields. I have recreated the look of the mixer to make it easier for them and I want them to be able to hit the particular switch as it actually appears on the console...the knobs are going to be even more fun!

Thanks for the help,

Royce

Posted

Ahem... I don't think you CAN use [] as a boolean test.

not Channels::StatusR [ Get ( ScriptParameter ) ]

is the same as:

not GetRepetition ( Channels::StatusR ; Get ( ScriptParameter ) )

The "not" part refers to the CONTENTS of the specified repetition.

Posted

Ahem indeed, Thanks for the clearification.

That would have hurt my brain if you had not told me.

have not utilized either parts of your calculation to there full potential before.

I will use these often now.

It's sometimes hard to change when you have been doing things in similar ways for so long.

This is exactly why the forums are so great for me.

:

Posted

Take a look at the field format for the repeater, it's a number boolean formatted with a = for "true" and nothing for "false"

--sd

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