Rich Posted May 16, 2019 Posted May 16, 2019 Greets, all: I'm using this calculation--in a parent table in a field temporarily named 'Temp'--to grab course numbers from the course_number field in a related/child table: UniqueValues ( List ( ASSIGNMENT_COURSE::Course_Number__lxt ) ) (I'm using this calc because the child table contains multiple records with the same course number; it's not a key field.) My intent is to use six buttons--in the parent table--where each button would grab an assigned row's value using the calculation above. For example, say that the above calc has this result: AST-100 EDU-100 EDU-300 PHY-100 SOC-100 TMA-001 I want Button 1 to grab AST-100; Button 2 to grab EDU-100; Button 3 to grab EDU-300, etc. Mind you, I can't make a value list out of Temp because it can't be indexed. TIA for your help!
comment Posted May 16, 2019 Posted May 16, 2019 I am not aware of any method that would create layout objects such as buttons dynamically. The most you can do is pre-create as many buttons as you could possibly need, and hide the unused ones. If you use a button bar, you can use calculated labels as well as hide the surplus segments. Another option is to place the buttons in a portal. A portal can be de-duped - and if you have a TO of Courses behind ASSIGNMENT_COURSE, then you can make the portal show the records from there and have it show a row for each unique course only without any additional effort .
bcooney Posted May 16, 2019 Posted May 16, 2019 "(I'm using this calc because the child table contains multiple records with the same course number; it's not a key field.)" Why aren't you using keys?
tonywhitelive Posted May 17, 2019 Posted May 17, 2019 You could use a Button Bar with 6 Segments that calc their button segment labels using… GetValue ( SampleData::Text_Field ; Index/LineNumber ) …and “Hide (Segment) object when” IsEmpty ( GetValue ( SampleData::Text_Field ; Index/LineNumber ) ) Then add a parameter (1-6) to each segment…that you read into your script using Get ( ScriptParameter ). Use the GetValue function to map back to the course code 1
Recommended Posts
This topic is 2282 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