July 10, 200817 yr 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. :-)
July 10, 200817 yr 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.
July 11, 200817 yr Author 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 July 11, 200817 yr by Guest
July 11, 200817 yr 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
July 11, 200817 yr 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.
July 22, 200817 yr Author 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?
July 22, 200817 yr 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
July 22, 200817 yr 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 July 22, 200817 yr by Guest Added update
July 22, 200817 yr 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 July 22, 200817 yr by Guest
July 22, 200817 yr 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! LaRetta
July 22, 200817 yr 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.
July 22, 200817 yr It's a personal preference I suppose I should hope so - reading it makes me cross-eyed! :eeek:
Create an account or sign in to comment