Jump to content
Server Maintenance This Week. ×

unique values in value list


rkass068

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

Recommended Posts

Hello,

 

I have created a database with a bunch of patients. Each patient has a unique hospital number put on their charts. This number is usually assigned to them once they are registered in hospital. In some cases we like to keep track of people who donate bone marrow to another patient and they want to remain anonymous. In this case, we would put a "dummy" number in the hospital number field. I would like to make a value list of a bunch of dummy numbers that would come up in a dropdown for patients with this case. 

 

This is very easy as I can make a value list but my problem is that I want the dummy numbers to be eliminated from the value list once used, that way they are unique. In other words, I want only the unused dummy numbers to show up in the value list.

 

If anyone can help me with this that would be great. Thank you!

 

Link to comment
Share on other sites

Yes I do already have an auto serial number, but the docs want everything to look streamlined. Since the format for the hospital number is #########, they want the dummy hospital numbers to be the same. Is it possible to do this? I know seems weird but I do what the boss says. hahah

Link to comment
Share on other sites

SerialIncrement ( "000000000" ; PatientID )

will get you there. Or, if you want to smarten it up, you could use:

Right ( Year ( Get (CurrentDate) ) ; 2 ) & SerialIncrement ( "000" ; DayOfYear ( Get (CurrentDate) ) ) & SerialIncrement ( "0000" ; PatientID )

Note: the target field must be of type Text.

Link to comment
Share on other sites

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