AnsweredAssumed Answered

Get(ActiveLayoutObjectName) not working?

Question asked by mcarey on Jul 30, 2015
Latest reply on Jul 30, 2015 by mcarey

I want some users not to have access to the third tab of a three tab panel.  For the example below I have stripped out the criteria that identifies those user who should not have access and it still does not work as the Get(ActiveLayoutOjectName) does not return anything even though I have named the tab objects.

 

I create a 3 tab 'tab control' in FileMaker 13

I selected each tab individually in Layout Mode and in the inspector under the position tab, I typed in a name for each tab (one, two, three)

I then created a script called 'TAB Trigger Script' with the following steps:

 

If [Get (ActiveLayoutObjectName) = 'three']

  Show Custom Dialog ["You do not have access to Tab-3)

Go to Object [Object Name: "one"]

  Halt Script

End If

 

I then select the tab control and set the above script as the OnObjectModify script trigger.

 

I have tested the script in srcript debugger and when I click on Tab-3 the script trigger is activated but the Get(ActiveLayoutOjectName) step does not return a value when I am expecting it to return the object name I gave the third tab which is: "three". And the script falls out as the if statement is not valid when I am expecting it to be.

 

Does Get(ActiveLayoutOjectName) not retrieve the name entered in the inspector for a tab control tab?

 

When I use the Go to Object [Object Name: "three"] script step it works fine and I am taken to the third tab in the Tab Control so I know I have named the object correctly.

 

Thanks for you help.

Outcomes