cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Mimicking Excel functionality

cmakler
1-Newbie

Mimicking Excel functionality

I'm trying to create a user interface within Arbortext that acts like an Excel function. For example, I might have two elements in a custom table that contain "2" and "3," respectively. I then want to create a field that automatically displays the sum of those two numbers; and if I change one of those numbers, I want the field to update. Any insights as to the best way to do this?

Chris

4 REPLIES 4

Hi Chris,

I don't know if this will help you, but I have a similar situation in which I have an element that has a repeating child element called "time". I want the total of the times to appear at the beginning of the element. I did this using Styler by setting up generated text on the element with the XPath expression "sum(.//time)". This puts the sum of all the child "time" elements at the beginning of the element as generated text.

The total exists only as generated text, not as a value in the XML file. So whether this solution works for you depends on whether you're okay with having the result exist only as generated text. Also, I don't know whether you're using Styler, but I assume you can do the same thing with FOSI.

I hope that helps.

Carolyn Herlin

Thanks Carolyn! Yes, generated text is fine - we'll be using an XSLT that transforms the data later, and it can do the same thing.

Does anyone else have an alternative suggestion we should consider? I provided the simple example, but we're going to be creating a lot of custom functions (both text, numeric, and logical) - not just adding numbers together. We are using Styler as well.

Chris



This isn't an alternative suggestion, but the example I gave was also a simple one. You might check out the other math functions that are available in XPath to see if they can do what you need.

Carolyn

Will do! Thanks!

Chris

Announcements