Jump to content

  •  

Photo

Trying to disable the Revert Record dialog

revert field; revert record

  • Please log in to reply
7 replies to this topic

#1 sedek  novice

sedek
  • Members
  • 31 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Novice
  • Time Online: 1d 1h 4m 32s

Posted 28 February 2012 - 11:36 AM

I have a date field in a customer order entry layout.

I have put a custom dialog in the field properties if validation fails. It is done by calculation which I guess explain why it is the only field that shows a ''Revert'' option in my custom dialog box.

As users don't have a clue what this is, I need to get rid of it.

My calculation to validate the date is as follows: DateCedule ≥ Get(CurrentDate) and DateCedule ≤ (Get(CurrentDate)+184

That translate to anywhere between today's date and no more than 6 months from today.

I read in forums that the common way to avoid the Revert in a dialog box is to include a formula that changes color of the field. Using examples, I now have this formula:


If(DateCedule ≥ Get(CurrentDate) and DateCedule ≤ (Get(CurrentDate)+184); TextColorRemove(DateCedule; RGB(200;0;0) ) ; TextColor(DateCedule; RGB(0;0;0)))


Obviously, it contains a huge (or dumb) error as it doesn't do anything!


Can someone help me? I have a hard time with formulas in general as I am still a novice.
  • 0

#2 sedek  novice

sedek
  • Members
  • 31 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Novice
  • Time Online: 1d 1h 4m 32s

Posted 28 February 2012 - 11:45 AM

Update to my own topic:

In the properties of the field I could maybe use the ''in range'' option instead of a calculation.

But whatever entries I put there, It performs nothing in terms of validation.

What is the proper syntax to express ''between today and 183 next coming days'' in the ''in range'' option ?

Of course, the field has a Date format.
  • 0

#3 dansmith65  veteran

dansmith65
  • Members
  • 859 posts
  • LocationB.C. Canada
  • Certification:8, 11, 12, 13
  • Membership:TechNet
  • Time Online: 15d 2h 22m 25s

Posted 28 February 2012 - 11:53 AM

I think you were on the right track with a calculated validation. I don't know what you are trying to accomplish though. Do you want to validate the value of the field, or don't you? If you want to validate it, then the Revert button is there to stay.

Do you want to allow a value that is not in your specified range, and just show the user that it is not valid? If so, then you could use that same basic calculation (the first one) in conditional formatting, and apply red text (or whatever you want) if the value is out of the specified range.
  • 0

#4 sedek  novice

sedek
  • Members
  • 31 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Novice
  • Time Online: 1d 1h 4m 32s

Posted 28 February 2012 - 12:10 PM

I just want to force the user to correct his mistake.

If the revert field is pressed, it is then followed by a Revert Record dialog. If he presses it, he gets kicked out to the main menu and has to start over.

That is not elegant at all. So far my only option is to instructs users not to press it ...!!

Any idea about the proper syntax to express (''between today and 183 next coming days'') in the ''in range'' option of the field's properties?
  • 0

#5 Raybaudi  ChindoguMaker

Raybaudi
  • Members
  • 3,234 posts
  • LocationRome, Italy
  • FM Application:12 Advance
  • Platform:Windows XP
  • Skill Level:Intermediate
  • Time Online: 48d 15h 46m 43s

Posted 28 February 2012 - 12:37 PM

Can someone help me?



Get rid of that validation formula and try this one.

1) Do not set any validation formula for that field
2) Create a new script:

If [ Get ( ActiveFieldContents ) < Get ( CurrentDate ) or Get ( ActiveFieldContents ) > Get ( CurrentDate ) + 183 ]
Show Custom Dialog [ "This date is wrong" ] // enable only the OK button
Clear [ Select ]
End If

3) Set that field to trigger the above script by OnObjectValidate
  • 0
Daniele
--------------------------------
I'm sorry for my English

#6 dansmith65  veteran

dansmith65
  • Members
  • 859 posts
  • LocationB.C. Canada
  • Certification:8, 11, 12, 13
  • Membership:TechNet
  • Time Online: 15d 2h 22m 25s

Posted 28 February 2012 - 12:52 PM

Any idea about the proper syntax to express (''between today and 183 next coming days'') in the ''in range'' option of the field's properties?

You can't. The "in range" option contains static values, "today" is a dynamic value. Also, I've never used that for anything other than numbers, so I don't even know if it works/how it works on a date field.
That won't solve your problem anyways, the user will still get an option to revert. That option always exists if you use field validation. If you don't want it, you will need to use another method to validate data entry.

edit: I didn't see Raybaudi's post before I posted

Edited by dansmith65, 28 February 2012 - 12:53 PM.

  • 0

#7 sedek  novice

sedek
  • Members
  • 31 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Novice
  • Time Online: 1d 1h 4m 32s

Posted 28 February 2012 - 01:39 PM

Thank you for helping.

I tried that but the Revert still appears.

I will try again tomorrow and report back.

SD
  • 0

#8 sedek  novice

sedek
  • Members
  • 31 posts
  • FM Application:11 Advance
  • Platform:Windows 7
  • Skill Level:Novice
  • Time Online: 1d 1h 4m 32s

Posted 28 February 2012 - 05:30 PM

After checking carefully, I still have the Revert Field message.

However, the field does revert (which is fine) and the Revert Record dialog box does not appear now.

That means the user doesn't get kicked out to main menu anymore, this is what I needed.

Thanks for the help.

SD
  • 0




FMForum Advertisers