For example, say I have a directory with all the employees an multiple levels of managers. Employees report to a first level manager. A first-level manager reports to a second-level manager, who reports to a director. I create a column for who each person reports to as a “parent” column. I want to create a column to shows all the people that report to a person that is linked to the original parent relationship. Is that possible?
The purpose I have is different that my example but the concept is the same. Would appreciate the help! -Liz
Best answer by Hannah_Wiginton
Lizbeth_Pena_Fl wrote:
Hey Hanna Thanks for taking the time to look into this! I copied the code exactly and added two tables to match the Family Tree and Family Tree 2 names, but I didn’t have much luck. I got the following error using my example:
Hey Liz,
Yeah, looks like that just needs to be updated.
Check out the one further down by @kuovonne. I tried it out and it’s working as it should.
You’ll probably need the ‘Same Table Backlinks’ script.
Hey Hanna Thanks for taking the time to look into this! I copied the code exactly and added two tables to match the Family Tree and Family Tree 2 names, but I didn’t have much luck. I got the following error using my example:
Hey Hanna Thanks for taking the time to look into this! I copied the code exactly and added two tables to match the Family Tree and Family Tree 2 names, but I didn’t have much luck. I got the following error using my example:
Hey Liz,
Yeah, looks like that just needs to be updated.
Check out the one further down by @kuovonne. I tried it out and it’s working as it should.
Check out the one further down by @kuovonne. I tried it out and it’s working as it should.
Here’s a video of it working in my base
AMAZING! Thank you so much! That worked! I will leave the code below for anyone that finds this in the future. Thank you so much Hannah!
/*****************************************************************************************************
Name: Same Table Back Links
Date: July 9, 2021
Author: Kuovonne Vorderbruggen
Website: https://atmosphere.kuovonne.com
Description
Create backlinks for a table with same-table linked records
Usage
Copy and paste this script into Scripting App.
Click the “settings gear” for Scripting app and set the table and fields. No code changes necessary.
Click the “run” button for the script.
license
This script is provided “as is”, without warranty of any kind. Liability of the
author will be limited to a maximum of the original purchase price of the script.
The author will not be liable for any general, special, incidental, or consequential
damages.
*/
const inputConfig = input.config({
title: ‘Create back links for same-table links’,
items: [
input.config.table(‘table’, {
label: ‘Table with same-table links’,
}),
input.config.field(‘fldLinkAuthority’, {
label: ‘Original Link’,
description: ‘This linked record field is the “source of truth” for links. Its values will not be changed.’,
parentTable: ‘table’,
}),
input.config.field(‘fldBackLink’, {
label: ‘Back Link field’,
description: ‘This linked record field will be updated to match information in the original link field.’,
parentTable: ‘table’,
}),
]
});
/*******************************************************************************
Main function for the script
AMAZING! Thank you so much! That worked! I will leave the code below for anyone that finds this in the future. Thank you so much Hannah!
/*****************************************************************************************************
Name: Same Table Back Links
Date: July 9, 2021
Author: Kuovonne Vorderbruggen
Website: https://atmosphere.kuovonne.com
Description
Create backlinks for a table with same-table linked records
Usage
Copy and paste this script into Scripting App.
Click the “settings gear” for Scripting app and set the table and fields. No code changes necessary.
Click the “run” button for the script.
license
This script is provided “as is”, without warranty of any kind. Liability of the
author will be limited to a maximum of the original purchase price of the script.
The author will not be liable for any general, special, incidental, or consequential
damages.
*/
const inputConfig = input.config({
title: ‘Create back links for same-table links’,
items: [
input.config.table(‘table’, {
label: ‘Table with same-table links’,
}),
input.config.field(‘fldLinkAuthority’, {
label: ‘Original Link’,
description: ‘This linked record field is the “source of truth” for links. Its values will not be changed.’,
parentTable: ‘table’,
}),
input.config.field(‘fldBackLink’, {
label: ‘Back Link field’,
description: ‘This linked record field will be updated to match information in the original link field.’,
parentTable: ‘table’,
}),
]
});
/*******************************************************************************
Main function for the script