Skip 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.

Serial Numbers

Featured Replies

I have a single field that is setup to assign a specific number R-06-0001 when a record is created. What I am trying to do is that if one of two buttons are pressed after information is placed into that record that the number change to either a CRNA-06-0001 or ME-06-0001.

Can this be done?

Sure. The logic seems to be that if a certain script is run, the left of the original string up to the first "-" gets replaced by either "CRNA" or "ME".

You'll need the Position function to get the position of the first "-", then the Right function to take the serial string starting from that position and then concatenate the desired prefix with what you've grabbed from the original serial

The left of the original string up to the first "-" is the first word, so you can make it simple:

Substitute ( SerialID ; LeftWords ( SerialID ; 1 ) ; "CRNA" )

Note that is assumes the rest of the string is strictly numeric, or at least does not contain the "R" character.

Edited by Guest

  • Author

Ok... What I am trying to do is this...

When a Record is created it is assigned a serial # called "R-06-0001"

I have two other fields, one called MENUMBER and the other CRNANUMBER. What I want to do is that if button "A" is depressed than a serial number is placed into the CRNANUMBER field and if button "B" is depressed than a serial number is placed into the MENUMBER field.

However, although every record will have a R-06-00001 number, the record cannot have both a CRNA and an ME number. This is where I am confused.

Thanks

Hi

try this

P.S.:( I maded it with only one button, but it is easy to change to two buttons, if you wish !

SerialNumbers.zip

  • Author

Ok.. Close, but all three numbers must remain unique from each other in that they all must have their own unique # that increments independently from each other.

That is where I am confused.

Thanks

So the first one isn't a serial number !

(if it is, please give me an example of when it must increment)

Only ME and CRNA are serials ?

(one of them is always not empty or sometimes both can be empty ?)

  • Author

The first number (R-06-0001) is a serial # that is unique and really doesn't apply to my problem.

The CRNA # needs to be a unique serial # that increments like this (CRNA-06-001, CRNA-06-002 etc.)

The ME # needs to be a unique serial # that increments like this (ME-06-001, ME-06-002 etc.)

Either the record will have a CRNA # or ME # that is determined by the user. No record can possess both a CRNA # and ME # at the same time.

Also, if someone clicks a button and assigns an ME # but then wants to change that to a CRNA #, the ME # that was assigned needs to revert back so that it can be assigned to another record. This way, there are no "missing" ME#'s.

Does this help?

Thanks

  • Author

Your the bomb... Thanks, I really appreciate that!

  • Author

Slight problem....

If you have 20 records and you go back to an old record and try to change the number the calculation looks at the number right before it and then adds a number thereby allowing for duplicate numbers to occur.

Cas(flag = 0 ;LastMENUMBER; "" )

This calc should look at the last MENUMBER used and then add one from it.

What do you think?

If you have 20 records and you go back to an old record and try to change the number the calculation looks at the number right before it and then adds a number thereby allowing for duplicate numbers to occur.

This never occurs if you try to change manually those numbers, but can if you press the "Set Unique" button.

So go to change the script (setFlag) to:

If[Get ( RecordNumber ) ≠ Get ( TotalRecordCount )]

Exit Script

Else

Set Field[flag;Case(flag=1;0;1)]

End If

P.S.:( i changed the attachment to the previous post, too.

  • Author

Now the user can only modify the most recent record. How can I adjust this so that if a user makes a mistake and has to go back and change the number from lets say a CRNA# to an ME# that the number becomes the one greater that the last ME# that was assigned?

I cannot manually change an old number because it is a calculation.

I also need to have to buttons. One that will assign the CRNA# and one to assign the ME#.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.