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.

Displaying zero's in Calc. field.

Featured Replies

  • Newbies

Gentleman,

Small problem inside a larger problem. Large problem first.

I need a script that can take an existing series of random four digit numbers and start at 0001 and pick out and apply to a record only those numbers that arent in use yet. I have a dup-check running and have imported the existing numbers in as a serialized field. Now how do I start at the beginning and fill in the missing numbers starting a 0001?

Smaller problem.

I also need to display the number .ie. "0014" in a calc field that simply combines two fields into one. The numbers represent a unique code for commercials and are also defined by an "R" for radio spots and "" for TV.

...calc field =(field_A & field _:.

Field A is a serialized number field B is either an "R" or it is ""blank depending on the media type.

The result should look like this.."0014R" for radio..or "0014" for TV.

I cant seem to get the calc field to show "0014R". I see "14R". I understand why it doesnt show the zero's I just cant seem to make it do it anyway. Any ideas? crazy.gif" border="0

Make the field Text and NOT a Number.

  • Author
  • Newbies

@CaptKurt

Not your first day on the job I see!!

Thanks! Works perfectly. laugh.gif" border="0

An answer to your random problem...

Make a database with one field that contains the values you are using. There should be one record for each value, 0001, 0002, etc. Make another field that is a global number field.

Write a script and call it random or something. It should have the following steps.

1) Insert Calculated Text. The calculation should be: Round( Random* Status( CurrentRecordCount), 0) and the field it gets inserted into is the global number field.

2) Go to Field, option: by field value. Choose the global number field as your field value. This will cause the script to go to a record ID which has been randomly defined by the previous script step.

3) Copy the value from your value field. This number will remain in memory to be pasted somewhere as defined by your calling script in your main database.

4) Delete the record. This way, the value cannot get used again.

--------

From your main database, write a script that calls the external random script and comes back with a step to paste your new random value into the field you choose.

Please let me know if this helps or if I can clarify my instructions better. Thanks!

laugh.gif" border="0

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.