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.

Featured Replies

I have not been doing FM for a while and some things won't come back :

1. I have a button and I want todays date inserted in field A and time inserted in field B I know it's done from the script, but how?

2. It is a customer database and I want to have a drop down menu or similar with the options, New, Ongoing and Finished.

When I choose one option I want the background color to change color, or if that is not possible a color box or something.

3. As I import the customers from Excel and work them of, some of the Customers is already done and I have a field saying "Yes". If the field "Yes" contains Yes, I want the status automatically being "Finished" as above.

4. Last and just for looks. Can I get the drop down menus and check boxes etc. to use the Mac OS X default look? :D

Thanks in advance!

Mats

1. Create new script, say 'SetFieldValues'

Set Field[TableName::FieldA;get(CurrentDate)]

Set Field[TableName::FieldB;get(CurrentTime)]

Assign this script to the button.

2. Create field 'Status', type 'text'. In 'Options' >> 'Auto Enter' >> check 'Calculated Value'. set calculation as

Case (

Status = "New";TextColor ( Status ; RGB ( 255 ; 0; 0) ) ;

Status = "Ongoing";TextColor ( Status ; RGB ( 0 ; 255; 0) );

Status = "Finished";TextColor ( Status ; RGB ( 0 ; 0; 255) );

)

Uncheck 'Do not replace...'

  • Author

Thank you for the reply. But it's not working??

1. I think I managed to follow your instructions correctly but the colors don't change. I have uploaded the script steps in pictures on URL HERE I am sorry the Names is in Swedish :D

2. The Date script don't work either and also this script is on the same URL. There the problem is that only the Date is inserted but not the time.

1) In the second idalog have you forgotten to remove the checking in the box called:

"Do not replace existing value of field (if any)"

Well, you weren't instructed correctly actually!!!

2) You can't set the same field twice without overruling the first entry the script does. Perhaps you should reformat the field to text and the use one lines script

Set Field[Nicator_tel1;Get ( CurrentTimeStamp )]

--sd

  • Author

1) Well now the color is changing but also the text changes to become just a number (60). So "Pågående" changes to "60"

Also I wonder if I can't get the background or anything else to change color as that would be much easier to see when scrolling through the records?

2) Sorry but I don't really follow you there? As I understand the new script will not be linked with the button?

  • Author

And now I know why it changes to "60" I think. Because I have another field Named only "Status" and this field always have the value 60. I don't know why it picks up this value though?

  • Author

Now it's working! Thanks Søren :D

Now I am on to the field "ÖK_pågår" which may only be blank or have the value "JA" when I import the database from Excel.

I want the field "Status" to automatically be set to "Åtgärdad" (Finished) if the value is "JA", otherwise nothing.

Yet another autoenter is required again with the checkbox removed.

Case(Exact("JA";Status);"Åtgärdad")

--sd

Edited by Guest
Forgot a "

  • Author

Sorry, but where should it be inserted in

Case (

Arbets_stat = "Ny";TextColor ( Arbets_stat ; RGB ( 255 ; 0; 0) ) ;

Arbets_stat = "Pågående";TextColor ( Arbets_stat ; RGB ( 0 ; 255; 0) );

Arbets_stat = "Åtgärdad";TextColor ( Arbets_stat ; RGB ( 0 ; 0; 255) );

)

I tried some ways, but no go :D

No in the field you called "Status"

--sd

  • Author

I think I did not explain good enough.

The field which we made color changes to is called "Arbets_stat"

The field which will have non or "JA" value is named "ÖK_pågår"

Så if "ÖK_pågår" have "JA" text the field "Arbets_stat" should change to "Åtgärdad" (Finished)

Sorry that the text is Swedish.

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.