Skip to main content
Question

Generate incremental start/end range table

  • March 27, 2020
  • 1 reply
  • 14 views

vupathy
Forum|alt.badge.img

I have the following table:

Borehole_IDFinal_Depth243446575523452.5

 

I need to generate incremental Start/End (start from 0) ranges table based on unique values in Borehole_ID and the end values from Final_Depth. Something similar to table as below..

Borehole_IDFinal_Depth_RoundDownFinal_Depth_RoundUp243401243412243423243434657501657512657523657534657545234501234512234523

 

@takashi

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • 606 replies
  • March 27, 2020

Hi @vupathy,

You can get this done with a Cloner and AttributeManager.

Add a Cloner and set the Number of Copies attribute to Final_Depth and set the Copy Number Attribute to Final_Depth_RoundDown. Note: The copy number is an optional attribute that starts counting from 0 (you could leave this blank and use a Counter if you wanted to start the count at a different number).

0684Q00000ArKNnQAN.png

Add an AttributeManager after the Cloner to create the Final_Depth_RoundUp attribute and set the value of Final_Depth_RoundUp using the arithmetic editor from the drop down menu. Set the value to @Value(Final_Depth_RoundDown)+1 in the arithmetic editor or paste in the following expression into the Attribute Value:

@Evaluate(@Value(Final_Depth_RoundDown)+1)

0684Q00000ArKTaQAN.png

You can also remove the Final_Depth attribute in the AttributeManager to give you the output you are looking for.

Hope that helps!

Increment_Example.fmwt