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 7235 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello all

I have a question about the behaviour of a pop-up menu field. I have a field on a data entry layout that is currently standard behaviour. However I want to run a script that will change the behaviour of this field to a pop-up menu and possibly read only.

Can anyone tell me if this is possible and if so how would one do it?

Many thanks

eSBee ooo.gif

Posted

Scripts cannot change things like this. Instead, create two layouts and swap between them.

Posted

eSBee said ... run a script that will change the behaviour of this field to a pop-up menu and possibly read only.

eSBee, what isn't working with a regular popup? Can you describe your problem (ie, "I only want SOME staff to be able to Edit or Add to the popup" or "They select the wrong popup item" or "I want to fire a script when certain things happen" or whatever? Can you describe the problem you're having instead of asking if a specific solution is possible?

It appears that:

1) You want to control access and possibly fire a script from the popup (all very possible, in fact easy using Windows and Popup Menus; without silly loops you Mac people have to deal with).

2) You want a regular field (of that popup) which can be entered at times? That's possible also; Auto-Enter (Replace), Access Privileges and Field Validation can assist. Proper stacking order can drop a User into the field instead of the popup any time you wish!

I have to turn this around with Users/Owners frequently ... when they ask if I can do such and such, I ask them to describe their problem instead. Many times the solution isn't what they envisioned because they don't know all of the options available. And sometimes solving a problem means solving the problem that lead to the problem instead.

With so many toys in our (FM7) bag of tricks, I would bet we can give her a good solution to her problem. I think we just need more specifics to make the best suggestions. wink.gif

And I hate bloating a solution with duplicate layouts. It never fails that something is changed and you have to remember to change it (identically) in both places. I prefer to solve the problem on a single layout, if possible. In may not be possible in this instance; but it is well worth exploring further before giving up on it.

LaRetta

Posted

The *other* problem with using layouts to limit access is that it's only cosmetic. There is nothing preventing the user from changing the data using some other method (relationships etc) that bypasses the layout.

Record Level Access and passwords are the only real way to provide security and control access.

Posted

Thanks to all for your responses. Sorry for the delay in my response but was extremely busy and this is my first opp to respond.

Ok, on 2nd thought my question is probably not the best solution for what I'm trying to do, which is...

My standard field is called Estimate Date and I've written a script to find estimates for a specific criteria to list all the estimates ever produced by the Estimate Date for each record returned. I've modified my Estimate Date field to be a pop-up menu to reflect this. However, when new estimates are created I do not want a pop-up menu, just a standard field again so that the user can enter whatever date they want.

Anyway, my script continues with a message box to allow the user to keep or reject the current record for printing. For each record I want to be able to display the list of Estimate dates which will help them decide if to keep or reject the record for printing.

My script works fine for the main actions but when I try to keep the list of dates on the screen after a user keeps or rejects a record the list display doesn't work properly. So far I've tried to include a go to layout step and a pause step, both indefinitely and for a few seconds, within the loop for progressing through the records but if my list has more than one date within it the list does not display.

Not sure what to do really, maybe there's a better way to do it, I'm hoping without the pause step which requires the user to click continue which is an extra step I can do with out.

I hope this all makes sense and look forward to any response.

Much appreciated

eSBee

Posted

eSBee said ... I've modified my Estimate Date field to be a pop-up menu to reflect this.

I'm still a bit unsure on what you are doing here, since a pop-up is based upon all records in a table occurence and not a found set. And I'm unclear on what you are isolating (finding) but what you wish is certainly possible.

Field stacking is not new. Now ... if someone is Mac, the technique would be a bit different, ie, you would need to stack an edit field and pop-up List. I learned this technique from CobaltSky NightWing Enterprises (his Layout Menu and Script Menu demos) which stack edit, pop-up List AND pop-up Menu and then tests the platform being used to choose which field to enter (or which pop-up to pop).

eSBee, since you are windows, this will work for you. I use this frequently with pop-up Menus on Windows. Whether it will help your current situation is still in question.

Attached Windows Demo: Stack two copies of your Estimate Date field (one a pop-up Menu and one an edit box). If you select the Estimate Date field (in the demo) and drag it aside, you will see a pop-up under it. Two things matter here: 1) Stacking Order: The edit box must be on top (Arrange > Bring To Front) and 2) Tab Order: The edit box should be one less in tab order than the pop-up.

Turn off field behavior to both fields (right-click, Field Behavior, unclick 'Allow Field to be entered in Browse.') Attach the script to the pop-up then select both fields and Arrange > Set Alignment, and Center-To-Center. I based the demo on criteria City, creating a Conditional Value List so that only appropriate Estimate Dates for that City appear in each popup. The criteria you test for in the script can be just about anything you wish.

The first record is City Springfield which has several Estimate Dates to choose from. The next record is Eugene which signifies a new record. If you click into the Estimate Date 'pop-up' on the Eugene record, it will drop you into an edit field to add a new Estimate Date.

I hope this opens up your possibilities. wink.gif

A Go To Layout [ ] step and Pause step? I'm having trouble picturing your User-process here. I think we'd need to see your file or script to figure out what you're trying to accomplish during their print selection entry.

LaRetta

Estimates.zip

Posted

Thanks very much for your response and the attachments which I will look at closely. In relation to the other matter that you do not understand here is my script, which takes place for each record in my found set.

Sort Records [Restore; No dialog]

Pause/Resume Script [indefinitely] #Allows me to select the Estimate Dates pop-up menu field to show a list of the dates that estimates were sent.

Loop

Go to Layout ["Estimate Entry" (estimate)] #Activate Layout to see data in Estimate Dates pop-up menu field

Pause Resume Script [Duration seconds: 3] #Allows enough time to see the information being displayed in the Estimate Dates pop-up menu field

Show Custom Dialog ["Initiate Customer Contact"; "Contact this customer?"]

If [Get(LastMessageChoice)=1]

Go to Record/Request/Page [Next; Exit after last]

Else

Omit Record

End If

End Loop

This does not work the way I expected as when the Layout is activated the 3 second duration does not work and I need to click on continue to get the pop-up window to keep or reject the current record.

Basically, for each record I want the Estimate Date pop-up menu field to display the list of dates within it so that the user can decide if to keep or reject it when the dialog window pops up.

I hope this has clarified things a little.

Much appreciated.

eSBee frown.gif

Posted

eSBee, you never leave that first Pause/Resume [indefinitely]. Also:

1) I would sort after I land on your final layout.

2) Instead of popping a pop-up to display your Estimate dates, you could more simply use an unstored text calculation of: ValueListItems(Get(FileName); "EstimateDateVL"). Substitute "EstimateDateVL" for your specific Value List name. Then just display this calculation on your layout.

3) You have your layout switch inside your loop.

4) I would reverse the If[ ] statement and omit the record and proceed on the Else

Is this why you wanted to display a pop-up as Read Only ... to keep it popped for display purposes? It seems easier overall to display the above calculation (item 2) on a layout and then provide Users with an Omit (or Keep) button (or simply set a global with IDs of the selected customers to print and print them all in one whack) ... but again, I can't quite *see* what you see (your design thinking and User process). I'm willing to listen further. wink.gif

LaRetta

Posted

Hi LaRetta, apologies for the late response. I've had a very long, hectic and tiring week so was unable to focus and I'm still trying to relax.

Thanks for your suggestions and offer to continue listening. I've had to put it on hold at the moment due to other workload but will look over your responses and come back to you if I need more help.

Again, many thanks.

eSBee

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