String Tables: Multiplying first input value by each counts

Hello, like from my previous thread, I’m new to webMethods and I’m trying to get a good hands on experience on it. I know I’m asking some strange questions here, but I really want to understand more of how it works. For what I’m doing right now, I want to print each of the values in a string table where the first column is the input, the second column is the values incrementing, and the third column is the outputs where it multiplies the cells from the first and second columns. Here is what I’m talking about:

[TABLE=“width: 500”]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3[/TD]
[TD]6[/TD]
[/TR]
[/TABLE]
and so on depending on your counter for the second column. The more number there is for the counter, the more rows that’s going to be added along with the calculations. I just at least need to know how I can get started onto this and understand what I need to do. Please let me know about it. Thanks!

You can use pub.math and pub.string services in WmPublic package and refer the built in services guide for service signature.

Hello prasanna, thanks for replying. Within the WmPublic package, which pub.math and pub.string services should I use for this? Please let me know. Thanks!

Nevermind, I’ve figured out what to do. Thanks!

can you tell how to print values through repeat?

thanks in advance

Hariom

What’s your business use case ?

Thanks,

Repeat (Count=10, repeat on "Success")
	Branch on $retries
		Sequence (check if $retries is not null && not empty)
			pub.math.multiplyInts (map num1=some value (say 1), num2=$retries, value to value)
			pub.list.appendToStringList (map value to fromItem, toList to resultList)
Map (clear pipeline variables keep only resultList)
1 Like