Investigate the "lookup" function...this is what you're looking for.
And you will need a relationship linking ShowSetup to Design.
and should this go in the auto-enter function? i already have things in the auto-enter calculation function.
I tried adding it to it as well as only having the lookup.
there is a relationship i think.
im also not exactly sure what i need to put in the lookup.
What is your auto-enter calculation?
A Looked up value setting or a calculation may be used to copy data from another table. Since you have an auto-enter calc already, you'd need to modify that calculation to do both tasks in a manner that produces a correct result.
Here is what is already in my auto-enter calculation:Let ( values = Substitute ( Self ; "/" ; ¶ ) ; // make it a list of values for easier value accessIf ( GetValue ( Values ; 1 ) = GetValue ( Values ; 2 ) ; GetValue ( Values ; 1 ) ; Self ))I need to get the value from ShowSetup::DefaultFadeTime and put it into Design::TimeThanks!Maxwell
So DefaultFadeTime is defined with the above calculation but it needs to look up the value of "Time" from a related table called "Design"...
I take it that you look up values from the related table but also need to be able to edit this field directly?
If so, I'm thinking in this way:Let ( values = Substitute ( If ( IsEmpty ( self ) ; Design::Time ; Self ) ; "/" ; ¶ ) ; // make it a list of values for easier value accessIf ( GetValue ( Values ; 1 ) = GetValue ( Values ; 2 ) ; GetValue ( Values ; 1 ) ; Self ))
Not exactly. Its the other way around.
Design::Time is the calculation and when i create a new record in the "Design" table i would like the Design::Time to get the value of ShowSetup::DefaultFadeTime.
the calculation above only replaces the Design::Time field when the two numbers on either side of the "/" are the same.
Does that make more sense?
Then does this work as the auto-enter calc for Design::Time?Let ( values = Substitute ( If ( IsEmpty ( self ) ; ShowSetup::DefaultFadeTime ; Self ) ; "/" ; ¶ ) ; // make it a list of values for easier value accessIf ( GetValue ( Values ; 1 ) = GetValue ( Values ; 2 ) ; GetValue ( Values ; 1 ) ; Self ))
Unfortunatley when I create a new record the Design::Time field still does not populate with what is in the ShowSetup::Default FadeTime field, it just remains blank.
A new record in ShowSetup? and did you also create/select a value in the match field that connects it to Design?
no, a new record in Design.
and could you explain that more? the two fields are related if that's what youre asking
Scratch the first part of my question--to much jumping in and out of different threads here to keep it all perfectly straight each time. But you can't use the fields that make up this auto-lookup as match fields in the same relationship used to look up that data.
Please describe the relationship that you need linking these two tables.
I have a field in ShowSetup where the user can input their DefaultFadeTime.
ShowSetup is a table with 1 record in it and all global fields that I use to help the user setup presets in other tables.
In this case when the user creates a new record in Design, all of the fields are blank.
To speed up the record creation process I made a field where the user can input their DefaultFadeTime so they dont have to enter it each time they create a new record.
The field that looks to the DefaultFadeTime is Design::Time
They should still be able to edit this field, but if they have a DefaultFadeTime of 3 (because they use that number often) they can quickly just bypass entering data into that field.
The second half to this process is that the user can enter two numbers separated by a slash (2/5), but if they enter the two numbers and they are the same I would like the field to update itself and make it just one number and no slash (2/2 should become 2)
Does that help?
What I am looking for is the RELATIONSHIP details.
In Manage | Database | Relationship, what field(s) in each of those two tables are linked in the relationship that you are using? What operator is used? = or X or ???