robroys68 Posted February 20, 2013 Posted February 20, 2013 I'm trying to set up a new tracking database within our current database. Currently I am setting up a new script to pull info from one layout and to create a new record in another layout. Here is theh script so far. Copy [select; ADS::ITEM NUMBER] Go to Layout ["Tracking" (TRACKING)] New Record/Request Paste [select; TRACKING::ITEM Number] Insert Current Time [select; TRACKING::Time out] Set Field {Activity::User Name; Get ( AccountName )] Go to Layout [Origional Layout] I am tyring to insert another field that pulls it's info from a Value List in "ADS" and just records what that item is in the "Tracking" layout. The value list in "ads will be changing but I don't want the record that is created in "Traffic" to change after it is created. I've tried a couple different ways to pull the info with no luck. Is there something I am missing or should I write an Applescript to do it? Thanks Rob
doughemi Posted February 20, 2013 Posted February 20, 2013 Do you really mean you want to set the field in TRACKING to the entire value list? Or just the selected value from that list in a dropdown field or a checkbox field? If the latter, try: Set Variable [$it_num; ADS::ITEM NUMBER] Set Variable [$it_val; ADS::<yourDropdownField>] Go to Layout ["Tracking" (TRACKING)] New Record/Request Set Field[TRACKING::ITEM Number; $it_num] Set Field[TRACKING::ITEM Value; $it_val] Set Field[TRACKING::Time out; Get(CurrentTime)] Set Field [Activity::User Name; Get ( AccountName )]//This assumes that the Activity table has a relationship to the TRACKING table; otherwise it won't work Go to Layout [Original Layout] Using variables is much preferred to copy/paste for a number of reasons, including: Doesn't disturb user's clipboard multiple values can be passed without going back and forth between layouts Using Set Field is preferred to Insert Current Time because the target field does not have to be on the current layout. (and using Set Field[] wherever you can means not having to remember quite so many script steps)
robroys68 Posted February 21, 2013 Author Posted February 21, 2013 Thanks. It now works just I wanted it to.
Recommended Posts
This topic is 4685 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 accountSign in
Already have an account? Sign in here.
Sign In Now