Prototype attribute error

I’ve created a “Zettle” prototype with the “author” attribute. Unfortunately, whenever I apply the attribute it automatically fills in the author with the alphabetically first author that exists. When I checked on the prototype itself, it too is filling in the first author available (screenshot). I try to fix it, but as soon as I click off the prototype and then click back on, it has filled it in again.

54%20AM%20-sm%20

The error also filters down and it looks like I have overlapping author attributes. Luckily, when I click on the attribute, the correct author shows up. I can’t imagine what else this is filtering into though.

(as a first-time user it won’t let me add more screenshots to illustrate)

Any thoughts on how to fix? Please keep in mind I have zero coding experience and probably need things explained in fairly basic terms. Thanks!

[quote=“jamie, post:1, topic:2546”]
Please keep in mind I have zero coding experience and probably need things explained in fairly basic terms.[/quote]
Quite understood, but it’s also not much info on which to give an accurate reply.

Something is setting an attribute (from the grab, it looks like $Authors) so the likely causes are—in no particular order:

  • A rule or edict set in the prototype
  • A rule or edict set locally in the note
  • An agent action acting on note’s matching the agent’s query
  • An OnAdd rule in a container, acting on notes placed in the container

So the first think is to select the prototype note and open the Action inspector. Select the Rule tab. Is there any code shown there. If so, copy paste the code into a reply here (put a ` back-tick before and after the pasted code so it renders as code). Now check the Edict tab.

If both those code boxes are empty in the Inspector, select the note with the problem and re-check the Rule and Edict boxes. Any code?

I’ll stop there for now so as not to ask too many questions.

If this is your Prototype, then every note, which uses this Prototype, will look exactly the same, with the filled in Author. Perhaps you try to delete the author in the Prototype, then the notes, that use it, should also not show this author anymore. (Unless you changed this attribute already, then this is only true for newly created notes)

2 Likes

Building on the good suggestions from @mwra and @cremoer, here is an easy way to fix the problem, if (as @cremoer guesses) it may arise from a prototype that has specific $Author values already entered for the prototype itself. As he says, that would replicate the author in every note based on that prototype:

  1. Copy or duplicate the prototype you are using now. (Select the prototype note; hit Cmd-D; that will make a duplicate, called “Prototype Copy” or something similar.)
  2. Go into that duplicate, and make sure you delete any value for the $Author attribute.
  3. Rename the prototype “Fixed Proto” or something
  4. Create an agent, to find all the notes based on the original prototype. Its query would be in the form of $Prototype=="Original Proto"
  5. Have the Action of that agent be a change to the new prototype. The Action would say something like: $Prototype="Fixed Proto"
  6. Once the agent has run, it should switch all the items from old to new prototype. You can also then, if you want, delete the original prototype, rename the new one, or clean up in other ways.

Question for the experts: If new values have already been entered for some notes, in the $Auth0r field, I believe that switching to a different prototype, which has no value assigned to that field, should not blank out or overwrite any data you’ve already entered (and that wasn’t contained in the prototype itself.) But it would be probably good (a) to wait for one of the experts to weigh in here, or (b) to try this operation, via QuickStamp, on just a single note that has new values for $Author, to make sure it doesn’t mess things up.

This is correct. If a note has a specific value, that value overrides inheritance.

I so appreciate all your suggestions! And the fact that I understood what you saying is extremely helpful.

I’m not exactly sure what worked but, after throwing several things at it, the original prototype is now working without a hitch.

If this happens again I’ll try to keep better track of what worked so I can pass the information along.

Many thanks!