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

Custom validate value list is valid?


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

Recommended Posts

Posted

Hi,

I have a layout which contains a popup-list. How can I stop users from typing in there?

I had validation being done by FM7, but went to my own vallidation scheme and now I either have to stop them from typing in there - or compare the selected item in teh list and then see if it's in the table which the value list uses to render itself. Oh and also these fields are just copied values - not related.

sorry, one more thing, I would like to the ability to let the user click a button and add an item too. I guess I could just use a popup layout for that.

thanks for your help in advance,

sincerely,

J__

Posted

Not that I fully follow your description, but weren't it an idea to put the entire thing under scriptcontrol instead of giving any access to the field in browsemode?? What if you used this method:

http://www.fmforums.com/threads/showflat.php?Cat=0&Number=87872

...and tied a "Show custom dialog" to the cancel button, to let the user enter new values again vildated by the script lines following???

--sd

Posted

I'm sorry i wasn't very clear and thanks for the pointer, I'll check it out.

Let me try one more time:

- I had a layout with , for simplicity sake 1 popup list. Originally the layout was validated using FM7's built in field validation.

- Well, it turned out i couldn't use that; so I wrote my own script(s) to validate the fields on the layout.

I realized that if you tab into a popup-list and click on it, then start typing, you can enter an value in my tables field, whiich is not in the list. This is what I am trying to deter.

So, i wanted to find out what was the best approach.

I have tried using a loop (many of my value lists are based off of tables) and using the 'Freeze Window', i can switch to a layout, loop through the items in the table (it's a pretty small list of items < 32 ) ; and see if the item is in the list, if not, i show a dialog.

i was just wondering if there is a better way. I think i discovered one better way ValueListItems() and check if my field entry is in there using pattern maybe.

sorry for the rambling. But as I said I'm just trying to find out what options are available.

thanks again for the response,

sincerely,

J__

Posted

sorry for the rambling. But as I said I'm just trying to find out what options are available.

The noblest quest of all!!!

--sd

Posted

Thanks for the responses.

I used

if PatternCount ( ValueListItems ( Get ( Filename ) ; "my_value_list" ) ; tasks::Status ) = 0

set field [ tasks :: gMatched ; 0 ]

go to field [ tasks::status ]

else

set field [ tasks :: gMatched ; 1 ]

end if

Any way to force the drop value list to drop (it's a popup list).

I tried setting the tasks::status field to ""

and then going to the field. This sometimes works, but not always. Anymore full proof way?

thanks,

sincerely,

J__

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