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.

--Value List based on current date?

Featured Replies

Hi,

Just bought FM8 Advenced from FM's dealer in China. Get problem when I am creating a service call book system:

1. Value list based on current date;

2. Date Caculation/Relationship.

Who would give valuable advices to me can find more information in attached sample file.(winziped).

Thanks.

Value_list_based_on_currentdate.zip

Edited by Guest

Try this. It's set to calculate a field for the relationship up to 5 days before and 5 days after the current date.

This is the simplest way to do this, I think.

Auto updates, too.

This creates a set of entry fields to create a 'Range Length' for selection.

k?

SelectDateRangeFromtoday.fp7.zip

But will it still work tomorrow? If you don't modify the before/after radio fields, what's going to trigger the list calc to get the current date?

  • Author

Hi comment,

I simplified my database, just use Service_call_enddate>=Get(CurrentDate) to list all call in progress.

Edited by Guest

I don't know what you have now, but the file you have posted does not work. If you do not modify the Before/After fields, the value list will be stuck forever with the same dates.

  • Author

Thanks. You are correct.

We have to find another way for solution.

This thread is still open.

I don't know what you have now, but the file you have posted does not work. If you do not modify the Before/After fields, the value list will be stuck forever with the same dates.

I hope you realize that the problem is only with the value list. Generating the key for the relationship is a breeze. But a value list can only come from indexable values, so there's no way you can use Get (CurrentDate) for this, at least not directly. You'd need to make the field a button that runs some kind of a script - as shown in the thread I linked to in my first response, for example.

Do you really need a value list here? What if you format the field as a drop-down calendar instead?

  • Author

Finally I found it's much easy to use g_CurrentDate<=Service_Call_End_Date relationship to list all call not finshed.

g_CurrentDate=If (IsEmpty ( Main_Menu::gShow_ToDay_Engineer_Activities_Engineer_Name ) ≠ 1; Get ( CurrentDate ) ; "" )

Attached is the screenshot.

Thanks comment.

Rel1..jpg

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.