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.

validation - forcing a field to equal something

Featured Replies

This is kind of convoluted.... bear with me.

I've got a database that essentially has user names and passwords. (They're not real, so the security is not a problem.)

Anyway, records will be entered into this database exclusively via the web. This allows me to populate two fields at once.

What I want to do is force the password to equal something specific based on the user name, since they're getting submitted at once. I want to prevent people from being able to create a record with X username but Y password. They can only create a record with X username and X password.

The username and password values are predefined. For every username that exists, there is one unique password. All of these passwords live in a value list. I can force the password field to be a member of that value list, which will prevent folks from entering an invalid password. But they can still enter their username with someone else's password. Get it?

(The actual online process will be a record created by a URL. The URL will include both the user name and the password. I don't want people to be able to change the fields in the URL and successfully create new records.)

Any ideas? Sorry it's confusing...

TIA,

Carrie

This may be a silly question, but...

Any reason why the Password field can't be a calc field?

Concatenate the username and password in both the database and the URL. Make a value list based on the combined field. Force the submitted value to be a member of this list.

  • Author

How can I concatenate in the URL?

I guess I could do it in my perl script.... that's a maybe.

Is there any other way ?

  • Author

I suppose it could, but it would be pretty nasty.

The user names are a max of 8 characters - first and middle initial, and first 6 letters of last name.

The password field is a 12 character randomly generated string. In order to use a calculation, I'd have to say if username=x and password=x okay, otherwise not okay. I'm not even sure how to set that up.

Right now there are about 20 entries that would have to be in that if statement. And it doesn't make for very easy updating as there are more.

Depends on how you are creating the URLs. How does a user enter the username and password from the web page? If you use a form, then you can ask for the name and password in two identical text fields:

<p>Name: <input type="text" name="namePass" value="" size="40"></p>

<p>Password: <input type="password" name="namePass" value="" size="40"></p>

The two values will wind up in the namePass field with a return between them.

In your name and password file, create a field, namePassCalc, like this:

namePassCalc(calc,text) = name & "@" & password

In the file where you will create records, make a NamePass value list that takes values from the namePassCalc field.

Make namePass validated by calculation:

Position("

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.