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

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

Recommended Posts

Posted

I have a date field. I only want dates entered by selecting from a drop-down calendar. I've tried turning off entry to the field and attaching script with:

Go To Field [ dropdownField ] ... with and without Select Field Contents

Nothing I can think of works. Unchecking 'include icon' allows the pop when field entered - but doesn't prohibit entry to the field. Once the calendar is open, I don't want them to be able to click again and end up in the date field itself. I haven't played with 8.5 yet - maybe GoToObject? But still, we are on vs. 8 and I want it now.

Is there any way to pop that calendar via script? It must be something simple I'm missing. :wink2:

LaRetta

Posted

Maybe you can try with two fields one big and locked and second very small and positioned behind big one.

In script you enter small field but big field shows contents.

I created sample file ( small field is in the top right corner )

HTH

HiddenDate.fp7.zip

Posted

Hi Duke! :wink2:

Yep, I had tried field stacking and various other tricks. But, since the cursor stays in the field (in your example the small field), a User can still hit delete or type a different date. You can see it happen ... when the calendar pops up, don't select a date from it and instead click the date field again ... then hit delete or type a different date.

But I think your method has gotten me much closer! Simply, as long as the cursor remains in the date field, it can be changed. So I modified your demo in two ways:

1) I use a variable to hold the prior date and tested for date change in a loop/pause. I wanted the smallest duration possible and I thought we could now have shorter pause times than 1 second but I see no difference (?).

2) I deleted the calc field for display of the date and instead used a merge field (one less field to mess with).

I've attached the result. There is only one problem remaining ... if the calendar is popped but the user clicks elsewhere instead of changing the date then the script never ends. I tried changing the Exit Loop[] to include if Get ( ActiveFieldName ) not equal to ship date (and also capturing in variable and testing) but I can't get it to work.

I suppose I could wrap another loop and exit the loop if date is same (after 5 seconds or so) but if they need to jump ahead on the calendar, it might not give them enough time to select; too long a duration and it will interfere with their work. Nothing would be more irritating than to pop the calendar, realize you instead want the same date and never leave the loop. :crazy2:

Unless I can resolve this, then I'll have to go with your method; which allows User access to the field (and goes against my ultimate wish). Any other ideas most appreciated. :wink2:

HiddenDateMOD.zip

Posted (edited)

Rellis, this is great - but if after popping the calendar, you hit delete then you can delete the date and manually type into it. The idea is great though! But yes, I knew I needed script and not Specify Button.

Hi Michael!! I was responding and testing and didn't see these new posts. Why, you asked? Why do I want to lock down that date field? Because this is the date field which was failing field-level validation when another script was initiated (another post of mine you helped with). I thought I had resolved that by error testing but they are STILL getting by it somehow!! I thought if I could insist they choose a true date then I could finally stop the errors.

I suppose I should have gone back to the validation issue but, even the validation fired properly, it upset my Users and they began clicking everywhere trying to make it stop. And they would get out of it somehow OR, it would validate (say the date was wrong) when it wasn't. I've been working on this problem for quite some time ... my Users are now afraid to work in this screen because they never know what will happen. I thought the drop-down calendar might just solve the problem and I could then remove the field-level validation.

LaRetta

Edited by Guest
Posted

I thought we had solved the validation issue. In any case, the drop-down calendar works very much like a drop-down menu. Once the field is active, it is open for keyboard entry as well. So I'd say that's a dead end. You could go back to pre-8 methods of scripted date-picker.

Posted

You can also create your own FM calendar and when user clicks into date field you show calendar in new window and pause script until user chooses date.

To exit script when user clicks outside field just add - or Get ( ActiveFieldName ) <> "ShipDate" - in exit loop script step. But when script is looping it is impossible to select date from drop-down calendar ( it is flashing instantly ).

Posted

Yeah, I thought we had solved it too, Michael. I'm still attempting to pin down HOW they are breaking it. They get angry and turn their computers off. I will make the suggestion to FM that drop-down calendar has option of NOT allowing field entry (behaving more like pop-up menu).

And I'll try to pin down that validation problem ... I need to figure it out anyway. I just thought the drop-down might solve it for me, on this one constantly-used orders screen (which is the only place this critical ship date appears or is modified). I have debugged it for hours and can't replicate the breaks. Asking my Users to stop and tell me exactly what they did isn't working either. :crazy2:

I will consider whether to add date-picker back but, since I MUST understand why it breaks ... and once I do the problem will be solved, I suppose I'll just keep trying to fix the validation problem instead. Sorry to take everyone's time ... I thought it would be fairly simple to only allow selection from drop-down calendar, thus ensuring valid date entry. Thanks for trying, guys!!

LaRetta :wink2:

Posted

Duke? Are you saying the file I attached doesn't work on Mac? It works fine for me. I'm curious!

I tried adding Get ( ActiveFieldName ) but it didn't work. I had changed it to:

Exit Loop If [ Untitled::ShipDate ≠ $date or Get ( ActiveFieldName ) ≠ "ShipDate" ]

... and

Exit Loop If [ Untitled::ShipDate ≠ $date or Get ( ActiveFieldName ) ≠ $$activeField]

Data viewer showed that ($$activeField) = Get ( ActiveFieldName ) would set with ShipDate. But when testing for it in the Exit Loop[], it would

Geez ... I just opened my second copy of the test file to see my other tests. I ran this script and it works perfectly (just as you said it would and how I expected it to work when I wrote it). Do ya ever get so deep into something that you wouldn't see the answer if it smacked you?

This gives me exactly what I want. But I am still curious what you meant about the flashing. My status area pulses a bit (but that's to be expected and I don't show the status area anyway). But my layout and calendar remain perfectly still. Is this is Mac thing you are observing?

Anyway, for Windows at least, the attached works perfectly and I'm one happy puppy!! :smile2:

LaRetta

Copy_of_HiddenDateMOD.zip

Posted

They get angry and turn their computers off.

Best suggestion I've heard in years.

"Hey, have you tried getting angry and turning your computer off?"

"Mhmm... Thanks, that worked beautifully."

Posted

:giggle:

The two guilty Users were new. We had a talk about it. But, if a User is frustrated when using my design, the fault is MINE. I've spent probably 60+ hours on this one issue alone. I will use this drop-down technique and still focus on understanding the logic behind the field-level validation break.

Except ... one rep has a Mac. At this point, if my last file doesn't work on a Mac, I'll tell him to use a different system until I figure out the validation failure. :smirk:

LaRetta

Posted

Ehmmm, no, that's not the desired effect. :

Can you explain why Macs respond this way (or why Windows doesn't)? I'll be getting my Mac in a week but, even though I would obviously SEE the difference, that wouldn't explain why. Poking in the dark, I would assume it is anti-aliasing or rendering issue differences? Can you tell me or speculate? I truly want to understand.

LaRetta

Posted (edited)

Hi, Danielle!

I had considered that. But without a loop it can close before they choose. Sometimes they schedule a shipment 6 months in advance. Not possible unless we extend the duration; at which time, they might have already selected and are attempting to run another script or type into another field. Thanks for joining in the attempt to help on it; I really appreciate it. :smile2:

Also, I hadn't used a boolean test on the ShipDate because it is an auto-entered date which determines the very next ship cycle so I needed to test back against it to see if it had changed. I'm pleased to see you using boolean tests whenever possible ... JT would smile. :wink2:

LaRetta

Edited by Guest
Posted

I'm curious about the OS/version connection, Danielle. Did that last file of mine flash like the Mac users are reporting? You use Windows XP, right? I'd like to isolate why we're getting a difference. I'm using Win XPpro FM 8.0v2 here.

Posted

Hi LaRetta

on Windows your file is OK... but the Loop, as you had noticed, makes some very tiny flashing on my notebook with Pentium3; no flashing on Pentium4... but you have to hide both left bar and text formatting bar.

P.S.: my name is Daniele, like Daniel in English...no duble "ll" :

Posted

Very sorry for the misspell, Daniele. I've spelled your name a hundred times. I was quite tired. :

I was attempting to find out whether we have OS connection or vs. connection as well. Are you running 8.5 on them all? A looping script ALWAYS produces a very small pulse - always has on both platforms but that's not what is being reported. I have not reports of this type of brain seizure flashing (with looping script) through any versions greater than 5.

I suspect it has to do with layering - remember when we Windows experienced objects overlapping the status area but Mac users didn't. If that drop-down calendar rides in the same layer as the status area (on Macs), that might explain it. The more we understand unexpected behaviors, the more we understand FileMaker internally.

LaRetta

Posted

Hi LaRetta

I re-readed all the topic and maybe I still didn't understand...

But it seems to me that this is what you want !

( No Loop, No Pause and sure both platforms compatibility )

Or you wished that the user changes that field ?

Edit: I'm attaching a new file, that shows up an error message if the user types CANC, while the calendar is shown... but he still can types CANC AND A DATE :

BTW: this can be made on your file too.

HiddenDateMOD4.zip

Posted

The idea was NOT to have field-level validation. That was why I was attempting to lock Users from entering the field in the first place (and only selecting from the calendar). Your last file allows deletion of the date AND changing to another date; both what I was attempting to stop. It also will not pop again when clicked. Try playing around with it and you'll see what I mean. While clicking around with it, it also refused to let me return to the field to select a date (at one point) and just kept firing the 'you must enter a value' but when I clicked OK to the message, the message just kept appearing and I never could enter the field again. No wonder Users hate field-level validation. I ended up turning my system off in frustration. Ha hah ha.

Unfortunately, your file puts me no closer to my goal. And we truly don't know yet whether it is an OS issue or a version issue (on the spastic flash) ... you still haven't told me the versions you tested that loop on. Again, I sure appreciate your try.

LaRetta

Posted

A minor update:

In v.7.0.3, if you go to a drop-down list and loop-pause, certain objects in toolbars will flash. This seems to have been eliminated in 8.5 (I don't have 8 to test).

However, if you do the same with a drop-down calendar, the calendar itself flashes.

Posted

Hi Michael,

I knew there was SOME flash when using a loop/pause (with drop-down) on Mac but it didn't appear the same as what you've described on the drop-down calendar. I considered the correlation (drop-down vs. popup behavior on Mac) but Ray has xplat examples in vs. 6 format uses loop/pause on stacked drop-down/popup. I can’t imagine that he would put out a demo which produced an epilepsy attack on a Mac so I dismissed the connection (described in your link). Instead, this appeared new (and specific) to the drop-down calendar; which rendered the idea totally unusable at all - major psychotic behavior and not simple annoying loop/pause pulses. I sure wish I could SEE the difference. :

Thank you for the additional information. Vs. 8 is when Tab Controls were introduced and the layering manipulated. The status area flashes on both versions but maybe on Macs, calendar is on same layer so the calendar flashes as well ... just speculating, of course. We're moving through versions so quickly that my testing is falling behind. At least with my Mac, I'll be able to compare them! :smile2:

LaRetta

Posted

It is difficult to impart in words the exact amount of flashing. I have no doubt that the source of flashing is the same for drop-down lists and calendars. The difference is that the calendar itself flashes - and the calendar is much larger than the flashing areas in toolbars. Add a very short pause to the mix, and you get a very noticable and very annoying flicker.

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