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.

calendar buttons

Featured Replies

I have been reviewing the calendar samples need to understand about dynamic buttons.

If I have a layout with a calendar where I can click on a specific date, is there a way to use these button to fill various date fields with different dates...

for example... I have start date and end date fields on a layout and a calendar in the upper corner. Can a user click in the start date field then on the calendar button, that date would populate into the start date... then the user clciks in the end date, then on the same calendar, but a different date, and that date populated the end date..

Maybe there is a different but equal way to accomplish?

thanks

c

You could have a script like this attached to your button:


If [isEmpty(StartDate)]

  Set Field[startDate, <<the date calculation>>]

Else

  Set Field[EndDate, <<the date calculation>>]

End If





This checks to see if the start date field is empty and if so, sets enters the date there. Otherwise, it puts it in the End Date field. So, you simply click the starting date and then the ending date in that order.



If you have separate buttons for every date, then <<the date calculation>> would simply be the literal date associated with the specific button. On the other hand, if the button is in a portal row, then <<the date calculation>> would be a formula that references the related record and pulls the date in from there. 



If you want the user to specifically click a "Starting Date" button or "Ending Date" button before clicking the calendar button, then you can do this:





#Start Date button script

Set Field[gDateType, "Start"]

#End of  script

.

.

#End Date button script

Set Field[gDateType, "End"]

#End of  script

.

.

#Calendar Button Script

If [gDateType="Start"]

  Set Field[startDate, <<the date calculation>>]

  Set Field[gDateType, ""]

Else

  If [gDateType="End"]

    Set Field[EndDate, <<the date calculation>>]

    Set Field[gDateType, ""]

  End If

Else

  Show Message "Please click the Start Date or End Date button before clicking on a date"

End If

#End of Script

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.