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

Recommended Posts

Posted

hello all...

its me again...:-/...i have an issue and need your help to fix it. i have 3 fields [2 date type, 1 radio type] and i want to make sure once a date is entered into field2, user cannot change / modify it until radio button is clicked [on/active]. only when radio button becomes active/on, user should be able to change date into field2. currently field 2 contains this piece of code [Let(Trigger=Field1;"")] which basically means if a date is entered into field1, field2 becomes empty/blank. but my only issue is with field2. i want to make it disable once it has a date in it and radio button is not on/clicked and when radio-button is clicked/on, field2 becomes active to receive new date. at the same time i don't want to remove the existing piece of code in field2 [Let(Trigger=Field1;"")].

so how can i accomplish this?

many thanx on advance. :-)

Posted

no one can help? :(

No example file, no offer to pay for help, very confusing problem statement, still the same day as you posted your question.

Posted (edited)

confusing? really? :-/ i tried to make it as simple as possible. i guess sometimes we make things even more complex when trying to make them simple. well all i want to do is to make FIELD2 disable [containing a date] as long as RADIO BUTTON is not checked. once its checked, field2 becomes active to receive new date.

i can't upload/share the project file because its a huge project with tons of code in it and also i'm not allowed / authorized to share it with anyone. :-/

and thanx for ur reply. atleast u replied even if its not the solution or some hint... :(

Edited by Guest
Posted

Two date fields, and a radio button field? Seems like something that could have been recreated for the purpose of commonizing the field names, etc.

oh well, here is a very simple start, let us know if this is the idea.

dervaish.fp7.zip

Posted

confusing? really? :(-/ i tried to make it as simple as possible. i guess sometimes we make things even more complex when trying to make them simple. well all i want to do is to make FIELD2 disable [containing a date] as long as RADIO BUTTON is not checked. once its checked, field2 becomes active to receive new date.

i can't upload/share the project file because its a huge project with tons of code in it and also i'm not allowed / authorized to share it with anyone. :-/

and thanx for ur reply. atleast u replied even if its not the solution or some hint... :

Example file.

Nobody asked you to upload your complete file.

You can still go to the effort of making an example file and uploading it. And since you're trying to do something difficult, WHY are you trying to do something difficult? Can you explain what you are trying to accomplish?

Remember, you're asking for free help. Make it easy for people to help you.

  • 2 weeks later...
Posted

thanx for the help and replies guys. sorry i wasn't able to reply soon as i was in the process of moving to a new location and such.

Lee Smith, thanx for the example file. unfortunately its not a very workable solution for me. so now i'm trying to limit it to one date-field and radio button only. that is, if date-field contains a date in it then it cannot be changed / modified unless radio-button is active or ON. for me...this last modification request came in when i was 99.99% done with the project and coding. so to accommodate this new request...i will have to modify lots of code which i don't want to do.

so is there any way to disable the date-field as soon as a date is entered and then it remains disable until radio button is clicked / becomes active / ON?

Posted

This is probably most easily accomplished with a script. Make field2 a button and attach a script to it that goes something like this:

If[0]

Else If[RadioButton = Off or isEmpty(Field2)]

Commit Record

Else If[1]

Go To Field[Field2]

End If

Posted (edited)

DJ, I'm unsure but wouldn't this work: Turn off entry in Browse mode to the date field. Then attach script with:

If [ table::radio = "ON" or not table::date ]

Go To Field [ table::date]

End If

UPDATE: Oh. Hi Michael! I was trying to figure out DJ's script.

Edited by Guest
Added update
Posted (edited)

I wasn't clear on the logic...and looking again, I had it wrong. The first Else If should be:

Else If[not isEmpty(field2) and radioButton =/= "On"]

Which seems logically equivalent to LaRetta's.

Through testing it, the Commit Record isn't necessary even without LaRetta's clever twist.*

If you're puzzled by the seemingly bizarre script construction...that's how I do If[]s. I always put the relevant cases under Else If[] rather than If[] or Else. Makes it easier to modify later.

*Actually one can tab into the field without L.'s "don't allow entry in Browse mode".

Edited by Guest
Posted

Doesn't it then require an extra evaluation, DJ? 1 - If[0] and 2 - Else If[ yada yada ]

Also, the final Else If[] might leave resulting records not addressed; whereas Else would cover them, no?

But thank you for explaining it; yes, that was what confused me. And I see your point. I've had times I've had to modify an If/Else script and it can be irritating. I'm unsure if I could ever revert to your method but it certainly makes sense to me now! :wink2:

LaRetta

Posted

It's a personal preference I suppose, but I'm not concerned about the time it takes to evaluate If[0] even over the course of multiple If statements.

The last Else If[] is Else If[1], which is the same as Else.

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