November 22, 200619 yr Hello, I try to master the webviewer to use as a line chart. I'm nearly there if I input values one by one but I know that you can work with variables too! Can you help me in how to define a variable: The Y-axe is supposed to contain all the values of a field in a table. The variable has to be named &y. For example the y-axe needs to show/contain all values from the field 1603 from table FUP. Kind regards
November 22, 200619 yr What's "1603" again? Hopefully that's not the name of a field. You'll either need to use the List() function on a related field, where the relationship is a self-join, use a script to loop through and Set Field[], or use a script to Copy All Records and Paste into a global to assemble the field values into a single field. Once you have the values in a return-separated list, you can use a substitute() function to substitute whatever separator you wish in place of the ¶ separating the lines.
November 22, 200619 yr Author Yes 1603 is the name of a field. I know it isn't good. But it would take me too long to explain why. Believe there is a good reason Hmm that seems complicated. I'll need to sit back and think about it cause I'm not really into scripting. I had a example that uses getnthrecord but it doesn't seem to work on my project? Can't you write some code ? Again kind regards !
November 22, 200619 yr Sure, you could use GetNthRecord() in a custom function, but I think that would be slower that using List(). I suppose if the found sets are likely to be small, then that may be a good way to go (less overhead). You can find a CF for appending the items in the found set here: http://www.clevelandconsulting.com/support/viewtopic.php?t=637 If you wish, you can simply replace the ¶ in that function with your desired separator (in quotes). If you want to go the List() route, I think you'll learn more by taking a stab at it first. If you get stuck, let us know. In any case, I strongly recommend you rename any fields you have with number names. Otherwise it's pretty awkward to use those in calcs or scripts. Edited November 22, 200619 yr by Guest
November 23, 200619 yr Author Tx a lot. I finally managed to do it with the simple list function. Can you help me with the subsitute syntax. Now I have setvariable[$list;value:list(FUP:${1603}] set field[Chart Attributes::list;$list] This gives me a result in the field 'list' as folows = 1 2 3 4 How can write it that the result becomes : 1,2,3,4 Kind Regards Edited November 23, 200619 yr by Guest
November 23, 200619 yr Author Ok that part I resolved using Find/Replace. But I encountered another problem The graph doesn't accept ',' values like 2,5 So I need to round automaticly the values? But I can't figure out where to do it, here are the steps set variable set field go to layout go to field perform find/replace
November 23, 200619 yr To keep it simple, you can define a calculation field in the FUP table = Round ( ${1603} ; 0 ) Then you can do the rest in one step: Set Field [ Chart Attributes::list ; Substitute ( List ( FUP::calcField ) ; ¶ ; "," ) ]
Create an account or sign in to comment