Jump to content

Lookup Fields Between Tables


cameronjp
 Share

This topic is 1833 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello!

I have a field Defaults::Store and Progility::Store. What I am trying to achieve, is a script that copies the value found in Defaults::Store and pastes in Progility::Store when a user clicks a button to run the script. I am making this work at the moment by using copy/paste functions, but would ideally like to do it without using the clipboard. I have tried several things with Lookup/Auto-Calc but haven't had any luck. The value in Defaults::Store is also a member of a value list.

 

Thanks!

Cameron

Edited by cameronjp
Link to comment
Share on other sites

16 minutes ago, cameronjp said:

a script that copies the value found in Defaults::Store and pastes in Progility::Store when a user clicks a button to run the script

I am afraid that's not clear enough. Are these tables related? if yes, how? If not, which record/s in the Progility table should it modify? i am assuming the script is initiated on a layout of Defaults and is supposed to grab the value from the current record in this table?

In general, you would use Set Variable[] instead of copy and Set Field [] instead of paste. But if the tables are related, a lookup may be a better option.

--
P.S What on earth is "Progility"?

Edited by comment
Link to comment
Share on other sites

1 minute ago, comment said:

P.S What on earth is "Progility"?

Progility is a tech company that distributes things such as Motorola radios/walkie talkies!

Yes, the tables are related. I've tried playing with Set Variable[] and Set Field[], but I obviously haven't had any luck. I've also tried a lookup, but the value from Defaults::Store isn't copying across to Progility::Store.

Screen Shot 2016-07-21 at 11.25.49 PM.png

Link to comment
Share on other sites

Quote

I've also tried a lookup, but the value from Defaults::Store isn't copying across to Progility::Store.

I see no Progility TO in your graph. In any case, you cannot lookup a value into a match field, because the record in the target table is not related to any record in Defaults until the Store field is populated (chicken and egg).

I still don't understand the purpose of this exercise. If you want to populate a new record with some default values, you can do so by auto-entering them. The default values could be stored in global fields - thus accessible from anywhere without a relationship. Or, if the default value is an item in a value list, you can get it from there - provided you know how to identify it among other items in the value list.

Link to comment
Share on other sites

53 minutes ago, comment said:

I see no Progility

My mistake. It's Radio Repairs::Store Number and Defaults::Store Number. The purpose is for multiple stores to use this file and to be able to set their default values, and have them automatically fill into the form with one click. I have a value list with store identifiers. The value in Defaults::Store Number must be from said value list. When the value from Defaults::Store Number is entered into Radio Repairs::Store Number, the contact name, contact email, and model will automatically populate from the values found in Defaults::Model etc (this I have working using calculated values). So what I'm trying to achieve is a script that will lookup the value from Defaults::Store Number and populate it into Radio Repairs::Store Number. So, I can't set it as an auto-enter because it will differ from store to store.

Please excuse my lack of explanation/providing details. I'm trying really hard and I appreciate your help. There's so much terminology I don't yet know.

Edited by cameronjp
Link to comment
Share on other sites

On 07/21/2016 at 5:27 PM, cameronjp said:

The purpose is for multiple stores to use this file and to be able to set their default values, and have them automatically fill into the form with one click. 

Are they all using the same file  - i.e one hosted file, that each store will open as a client?

Link to comment
Share on other sites

This topic is 1833 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.