Indirect Binding, Dynamic Views, Custom Prop Locations- Beginner Questions

Hi! I think I am making progress but wanted to still check somethings to make sure this is the best option.

Setup:

I have a root container tab, each tab correlates with a folder in my tag browser.

This UDT is just an interval tracker I made quickly, could be for when your furnace filter needs to be changed next ect

I am making a dashboard- on it I want to monitor all these dates, get notified when something is due soon, and be able to update Last Done.

Question 1 - Where should custom props live?

I am pretty green to Perspective and was originally making them on a textarea not realizing all the spots they can be added. For housekeep is it best in which- root, Coordinate Container, Text Area? The highest level they might be used? If only that Text Area will ever need it put it on that component but if two components on one container might ref it put it on the container etc?

Question 2 - Can my tab expression be done with a lookup instead?

I made this custom prop at Root to look for what Tab I am selected on.

If({this.props.currentTabIndex}=0,'Lexi',If({this.props.currentTabIndex}=1,'Nala','Lola'))

I have my tabs as ["Lexi","Nala","Lola"]- can this be done automatically with some kind of lookup and return instead of nested ifs?

Question 3 - Was breaking into custom props the right call or could it all be one expression or else where?

Goal was to get a TextArea showing Last Done dynamically based on tab and dropdown selection. Which has been completed in the process of making this post but still have questions.

Originally I was trying to reference the Last Done datetime memory tags in the expression and do all the handling in the expression but that didn't work for me and I remembered custom props, but I made them a direct tag reference. My old expression:

'Last '+ {this.custom.dropdownSeletion} + ' Shot: '+ if({../Dropdown.props.value}='DA2PP',{this.custom.da2ppDate},{this.custom.rabiesDate})

I found indirect tag bindings on the forum to automate custom props. Since the container and props were copied from Lexi's tab they were all hard coded to her tags and dates.

Now I was able to make a custom prop to output the date of the selected vaccine for whichever pet is being viewed so I can copy and paste this container and have it automatically work.

Now in my TextArea text I can use a simple expression and skip the if statement completely.

'Last '+ {this.custom.dropdownSeletion} + ' Shot: '+ {this.custom.returnDate}

Best to break items out for reuse and troubleshooting like this? Could it have all been done in one Expression binding?

Question 4 - Name reference breaks on inactive tabs, should I be worried?

The name ref in the indirect binding breaks when that tab is not being viewed.

Since its dependent on the active tab, when I am on Lexi, any other tab's TextArea will be in error. Any unintended consequences to worry about? It would be fine if the text area is view-only as it will update once visible again? Could skip the name ref entirely here for an alternative. Still want to keep each tab simple to duplicate.

Question 5 - Best way to write back to Last Done?

Where in the guide or what is the best way to write a new date to Last Done - button, DateTime Selector?


Looking forward to any thoughts, Thanks!