Jump to content
Sign in to follow this  

Extract values from calculated list

Recommended Posts

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:







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! 


Share this post

Link to post
Share on other sites

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 .

Share this post

Link to post
Share on other sites

"(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?

Share this post

Link to post
Share on other sites

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

  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By Asu
      I know. Don't use them. But There is a simple task and a repeating field would be a quick solution.
      Field 1: a number
      Field 2: a calculated repeating field, each repetition adds the repetition number to the value of Field 1.
      Can it be done?
    • By stan111
      Gents, need your help on the following issue:
      I need to track my expanses. There are 4 tables: Products, PriceChanges, Transactions.
      The problem: I need to make a script which will make calculations in transactions tab, accounting for the latest price change.
      01 jan17 I bought one bottle of wine for $1 
      03 jan 17 I bought the same bottle of wine for $1,5. So the latest price is $1.5
      In Products table there is one record which is wine. 
      In PriceChanges table there are two records: $1 and $1.5
      I need that Transactions table automatically take corresponding wine prices while adding new or past records.
    • By Asu
      Hello FM Mavens, 
      I am likely missing something. 
      I have a script step that calculates the dimensions of an image in a container field. There are many such fields so the script should work with any arbitrary one. 
      I get the name of the field by using script parameter Get(ActiveFieldName). 
      Let's say I have a container field "cont1". The script is triggered by entering the field.
      I am trying to calculate the height of the image by using 
      GetContainerAttribute (Get ( LayoutTableName ) & "::" & Get ( ScriptParameter ); "height" ) The results are question marks - I am not sure why. If I explicitly identify the fields then the expression works. 
      Tried the same expression (Get ( LayoutTableName ) & "::" & Get ( ScriptParameter )) in the script step "Set Field by Name" and it worked, which means that the expression correctly identifies the field the script is attached to. Then why is it not getting it the first step? What's wrong with the calculation? (FM17)
      (I hope I posted it in the correct section)
    • By ash1474
      Hi, I am using this calculation in portal which calculates days in portal  Date - (GetNthRecord ( Date ; Get ( RecordNumber ) - 1 ) )
      how can i modify or do something else to avoid (?) in the first row.  Sample file attached for any modification/help.
      Thanks for any help
    • By Quant
      Could someone help me with this question?
      I have a row in a portal in wich i would like to make a calculation: Bedrag= Cases*Prijs,  but if Hoeveelheid is filled in then it should calculate Bedrag= Hoeveelheid*Prijs.
      The fields are all numeric. The calculation should be possible on one row, in this example i have made it on two.

      Yours sincerely
  • Who Viewed the Topic

    5 members have viewed this topic:
    Prasad Khandagale  nick360Works  Fitch  flyjar  OlgerDiekstra 
  • Create New...

Important Information

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