copy_node_from_another_profile = { label = "Copy Node From Another Profile" shortcut = "cnfap" requires_profile = true parameters = { source_profile = { shortcut = "sp" required = true } node_path = { shortcut = "np" required = true } } expression = ` #echo("profile: " . internal.profile_name); #echo("node: " . node_path); #echo("source_profile: " . source_profile); node destination_profile_node = 'profiles'{internal.profile_name}; node source_profile_node = 'profiles'{source_profile}; # Get the source node node source_node; if (!source_profile_node?{node_path}) then error("No node '" . node_path . "' in profile '" . source_profile); source_node = source_profile_node{node_path}; # Create the destination node, if it doesn't already exist @destination_profile_node{node_path} = ""; node destination_node = destination_profile_node{node_path}; # Overlay the source node onto the destination node overlay_node(destination_node, source_node); # Save the destination profile save_node(destination_profile_node); echo("Copied node '" . node_path . "' of profile '" . source_profile . "' to profile '" . internal.profile_name . "'"); ` } # copy_node_from_another_profiles