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.

Auto portal creation

Featured Replies

can anyone suggest a way to do the following. I need to be able to create "x' number of related records in a portal where x is the total months between 2 dates.

Basically i have a date range from 1/1/2002 to 3/1/2002 which equal 3 months (anyone know how to calc that to reach "3") and then create "3" related records starting with January and ending with March.

The end result would be that i select employee A in the portal from a value list, FM would then create 3 records with the same employee name which auto incremented months ending on March.

does this make sense?

Thanks!!!

Two words...Script, Loop

I'd run a looping script like

Loop

Check (on some criteria you didn't mention) if a new month has to be created

If Yes (else exit loop)

Sets a global field in the related file with the month to be created

Sets a global field in the related file with the ID of the person

Runs an external script creating the record and setting month and person ID from the globals

End Loop

Hi,

Here is how you can get that "3":

Create a calculation field: total = Month(date2)- Month(date1)+1

*OJO: Your dates will always be whole months? otherwise this will not work properly.

Once you have that:

1. Create a script that triggers a external script in the related file (store the number of months in a Global field )

2. The script in the related file will create a record in a Loop command.:

Count = 0

Loop

New record request()

Count = Count + 1

*** ANYTHING ***

Exit loop if (Count = File1::Gbl_Total)

End Loop

Maybe is not the best way to do it, but I

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.