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.

extracting content from field to match another table in another DB

Featured Replies

Hi All,

 

I have an imported field from excel labelled as "username"

e.g. username contains the following string: andy johnson (ajohn)

at times, some fields are as follows: tpage ()

 

"ajohn", "tpage" are actually unique login IDs found from another table in another database.

is there any method(s) to grab these login IDs for me to match my other table?

 

Thanks heaps!

I’m not sure I’m understanding correctly, but maybe the Substitute Function will work for you. i.e.

 

Substitute ( YourField ; "andy johnson” “ajohn" )

 

BTW, why did you choose the Server Topic? is the server involved, or did you intend this in a different topic?

Edited by Lee Smith
Added the BTW

e.g. username contains the following string: andy johnson (ajohn)

at times, some fields are as follows: tpage ()

 

"ajohn", "tpage" are actually unique login IDs found from another table in another database.

is there any method(s) to grab these login IDs for me to match my other table?

 

A more detailed explanation would be useful, IMHO. As it is, I can only guess you want something like =

Let ( [
start = Position ( username ; "(" ; 1 ; 1 ) + 1 ;
end = Position ( username ; ")" ; start ; 1 ) ;
id = Middle ( username ; start ; end - start )
] ;
Case ( IsEmpty ( id ) ; LeftWords ( username ; 1 ) ; id )
)

This tries to extract the portion of the text that is between parentheses. If the result is empty, then it returns the first word in the field.

  • Author

I’m not sure I’m understanding correctly, but maybe the Substitute Function will work for you. i.e.

 

Substitute ( YourField ; "andy johnson” “ajohn" )

 

BTW, why did you choose the Server Topic? is the server involved, or did you intend this in a different topic?

 

Hi,

 

Didn't realized I posted my query on the wrong place :X

 

A more detailed explanation would be useful, IMHO. As it is, I can only guess you want something like =

Let ( [
start = Position ( username ; "(" ; 1 ; 1 ) + 1 ;
end = Position ( username ; ")" ; start ; 1 ) ;
id = Middle ( username ; start ; end - start )
] ;
Case ( IsEmpty ( id ) ; LeftWords ( username ; 1 ) ; id )
)

This tries to extract the portion of the text that is between parentheses. If the result is empty, then it returns the first word in the field.

 

Sorry I didn't make myself clearer.

I need to compare this "username" field with "userID" field from another table.

if there is a match, it will then grab the relevant information (dept code, user name, etc) from the matching "userID" field.

Sorry I didn't make myself clearer.

I need to compare this "username" field with "userID" field from another table.

if there is a match, it will then grab the relevant information (dept code, user name, etc) from the matching "userID" field.

 

This part I actually got. It's what exactly is (or can be) in the username field that's not entirely clear.

 

Anyway, try defining a calculation field (result is Text) with the above formula, and use it as the matchfield in a relationship to the other table, matching userID in the other table. If there is a match, you will be able to see the related data in fields from the other table that you place on your layout (in this table). Or in a portal, if you expect more than one match.

  • Author

hi!

 

thanks for the advice!

 

the calculation is working great!

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.