Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custom validate value list is valid?

Featured Replies

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__

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

  • Author

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__

Hi,

Just set this field to not allow entry and attach a script to it.

GoToField[MyFieldWithThePopUp]

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

  • Author

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__

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.