Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6577 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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 :P the y-axe needs to show/contain all values from the field 1603 from table FUP.

Kind regards

Posted

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.

Posted

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 :P

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 !

Posted (edited)

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 by Guest
Posted (edited)

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 :P

setvariable[$list;value:list(FUP::P${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 by Guest
Posted

Ok that part I resolved using Find/Replace.

But I encountered another problem :P

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 :P

set variable

set field

go to layout

go to field

perform find/replace

Posted

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 ) ; ¶ ; "," ) ]

This topic is 6577 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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