I have made a few functions for a certain use case (further: "use case 1"). These functions are tested properly and work well.
Later I imported ("add existing items...") a couple of these functions to use case 2. These functions also work well in this second use case. But if these use cases were to come together in one solution for some reason, this way of working will cause a few errors, because the automation ID's will be identical.
What is a proper way to work with functions? And what would be a good way to handle the situation above (manually adjust ID's in the .OS)?
A solution should consist of multiple projects. If you keep your use cases in separate projects, then the IDs matching wouldn't be an issue. If you do have items in the same project that you want to make a copy of though, then the best way is to change the ID. I usually open it up in a text editor and replace it with a new ID. I generally change the last five characters to random numbers (or letters A-F).
I mixed things up in my last post, I indeed meant projects.
If the functions were to be in a dedicated project, it would be easier to manage the functions. For example: if for some reason a function needs to be adjusted it can easily be done by updating the dedicated project. Whereas if you would have made copies of those functions (and changed the ID's), you would have to track down all of the copies and make the adjustments in the separate copies.