Forum Discussion
BrianSeymour
3 years agoQrew Assistant Captain
Hhmmm … please be careful if you rely on the "-x suffix" for identification (relationships) since your counts could potentially change and have unexpected consequences if a child record were deleted.
Depending on your use case, it's possible to achieve this with the Formula Queries by counting child records having the same Parent where the child ID is less than or equal to the current child ID. For example, on the Child record you could create a "Formula - Numeric" field. Then, basically count siblings, like so:
Depending on your use case, it's possible to achieve this with the Formula Queries by counting child records having the same Parent where the child ID is less than or equal to the current child ID. For example, on the Child record you could create a "Formula - Numeric" field. Then, basically count siblings, like so:
// 7 is the Field ID of the Child::Related Parent
// 3 is the Field ID of the Child::Record ID#
var Number siblings = Size(GetRecords(
"{7.EX.'" & [Related Parent] & "'} AND {3.LTE.'" & [Record ID#] & "'}"
));
$siblings
Then, you'd create a "Formula - Text" field to concatenate the Parent and Child values together.
// Parent One 1-1 Child One
[Parent - Name] & " " & [Related Parent] & "-" & [Siblings] & " " & " " & [Child Name]
You can also head over to the Child's Advanced Table Settings and set the Record Title to the Formula - Text field above.
When you create the Child via Pipeline you mentioned you could set a static counter on the Child. First, you'd need to create a Summary field on the Parent counting its children. Then, in your Pipelines use Jinja to add one to the Summary count.
Does that help?