Jump to content

Worksheet - nesting records


Recommended Posts

Hi! I am creating a worksheet to list Circuit objects. The worksheet currently lists 'Circuit'.'Number', 'Circuit'.'Src_Dev_Name', and 'Circuit'.'Dst_Dev_Name' properly.

 

I would like to add a column that references a custom record attached to the destination device. The field is 'CPT_fielddevice'.'Mount Group' but entering that formula in the worksheet column header does not return anything, since the CPT_fielddevice record is not attached to the circuit. 

 

Is there a way to do this?

Link to comment
17 hours ago, Boris Stefanov said:

Hello @mstrauss159,

 

If I understood you correctly that you want to get a destination device record by having the circuit, I believe that it is possible to do that with the "eval circuit destination device" worksheet function.

For example, in the DB Row, your formula should look something like this: =OBJECTDATA('eval circuit destination device'; 'CustomRecordName'; 'CustomRecordField')

 

I believe that should be it, but if you have any other questions related to this, feel free to ask.

 

This did it, I just had to replace the semicolons with commas. Thank you @Boris Stefanov!

Link to comment
  • 2 months later...

Hi @Boris Stefanov,
I was wondering if the same trick could work with exchanging data from a record field attached to a Device, to a record field attached to an Equipment Item.

The Devices have the "Device Network Info Record" attached.
I also have Equipment Items which have an "Eqp Item Network Record" attached.

What I'm trying to do is have the 'Eqp Item Network Info Record'.'IP Address' be filled in by the value in its corresponding 'Device Network Info Record'.'IP Address'

 

I've been toying around with the =OBJECTDATA function, but no luck.

Is this possible and if so, could you help me out with the correct syntax?

Thanks in advance

Link to comment

Hi @Boris Stefanov<
I also reached out to other sources of wisdom and Peter Vanderwalle at Design Express Belgium helped me out with a script.
He called this "transfer_to_equipment' which is 14 lines of code.

In the Data Manager, I was then able to transfer data from 1 data source into the corresponding Equipment Item (based on the Name)

The formula is in the screenshot below.

While we're on topic:
If I have multiple instances of a Device, which are on different Design Layers, would it be possible to synchronize the value of a record Field between these Devices?
For instance; the 'Device Network Info Record'.'IP Address' filed is the same with every Device with the same Name, no matter which Design Layer they are on?Screenshot2025-04-15at13_58_48.thumb.png.90ccaf273009ac5c98b2e925eeb8a486.png

Edited by R_Teunissen
Link to comment
2 hours ago, R_Teunissen said:

@Thomas Peters although I did not make this script (that was Peter Vanderwalle @Design Express Belgium), I've pasted a screenshot below:

 

Screenshot 2025-04-19 at 14.55.01.png

 

That's a useful script, thanks.

 

Lots of my purposes for scripting seem to be scuppered by the fact that the sockets in devices are just copies of the same objects shown in the device profile group, which makes relational scripting outside of the standard ObjectEval functions quite difficult. I was hoping a script in this way might sort it but alas, not yet.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...