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

Hello. I'm trying to do a calculation and can't seem to figure it out. My objective is to determine the state that the user is from when they logged in.

I've created a global field using the get(accountname) function to get the current accountname.Next in the same table, I have created an accountname field and state field which holds the respective data.

So once I have the current accountname that is logged in, how do i compare that with my database of accountname and get the state they are from?

If you have a relationship from the global to the AccountName, you can use that to look at the related State.

  • Author

hi ender.

I do but how am I able to do in all in one calculation?

What I'm trying to accomplish is have a lookup field based on the logged in user's city. Therefore a record will contain the user's name and city they are from but i just can't seem to have an idea on how to match that with the accoutname and then translate it into a city within a calculation and there are too many users to use a case function(i think)to do comparison.

My objective is to determine the state that the user is from when they logged in.

What I'm trying to accomplish is have a lookup field based on the logged in user's city.

Make up your mind! :)

If the State and the City are part of the User table, you can simply refer to those related fields in your calc:

Name_City_State = User::Name & " from " & User::City & ", " & User::State

  • Author

I'm so sorry Ender if I sound confusing. Hope you forgive me. I guess I suck at trying to explain my situation.

I actually meant City. I don't think the solution(Name_City_State = User::Name & " from " & User::City & ", " & User::State ) you gave me is what I want and most probably it is because of my lousy explanation of the problem.So I hope everyone will bear with me while I try to explain 1 last time.

I have a field called currentcity.(this is to capture the city name which is registered to the current logged in user).

I am thining of using the function get(accountname) to acquire the logged in accountname which after getting, match it to the record of users in the database to see which city this user is registered to.Finally once i have the name of the city, i would like it to be placed in the currentcity field for me to use in other places as that will be a global field.

Same principle. For setting that global, use a script:

Set Field [ gCurrentCity; User::City ]

Another approach is to just use a relationship to the User table from whatever table you happen to be on to get whatever User fields you wish whenever you wish. No need to populate a bunch of globals.

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.