Editing Forms

Home Forums User Forum Editing Forms

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3259
    Avatarlafrench

    Hello,

    I am creating data entry forms for an invertebrate paleo collection. I do not have a lot of experience with learning software or editing XML code, but I have learned a lot from the available tutorials and pdf resources online. At this point, I only have a few things left to fix before our forms are finalized and I can just worry about data entry. Most of my issues involve the XML code and configuring Subforms within Forms. Here are my problems and the current state of them, if anyone can help me out in any way please do. I think that I could fix them myself if I only had some guidance, but I have not been able to find any resources to help me with these:
    1. I want to add donor information as a Subform on the Collection Object Form. I know there is an option for this in Interactions, but it is not as convenient for our collection as a simple spot on the Collection Object Form would be. I think that the “GiftAgent Table” in the XML would be the best way to do this, but I get errors when trying to add this into the Collection Object Form even though in the description it says it is a Subform for the Collection Object Form.
    2. I want more detailed collection information in my Collection Object Form. For example, I want to be able to denote that it was 10 inches above a contact. It seems like there are several ways I can go about this, but none of them are working out for me. One way is with Locality Detail, but in the XML there is only the title, instead of actual cell options. I have also tried adding Paleo Attributes or SubPaleo Context to my Collection Object Form through whatever Subform they go with respectively and that only gives me an error.
    3. When I open a Record Set to view one at a time and click through, they are in a strange order and I have not been able to find anything that will tell me why or how to fix it. I just want the Catalog Numbers to be in order, but instead they seem random to me.
    4. It is very important for my collection to have lithostratigraphic and chronostratigraphic information. The SubPaleo Context is supposed to be a Subform for Collection Object Form, but I get an error when I try to add it there. I now have put the Paleo Context Subform into the Collecting Event Subform on the Collection Object Form without issue, but the relationship is not correct for our collection. I need to find out how to make it a one to one relationship and in the help pdf it says this is possible by editing the xml but does not give any further information.
    5. In my Collecting Trip Form, I have a Collecting Event Subform, but it does not have all the information that is in the Collecting Event Subform of my Collection Object Form. I have gone into the code, but in the Collecting Event Subform for the Collecting Trip Form, there is no section where I can copy code from to add in cells.

    I know this was a long post. Thank you to anyone who made it through. If anyone has any further information on anything that I have described above, please do reach out

    #3260
    Avatararountre

    I’ll try…

    It might be helpful to look at the database schema (https://www.sustain.specifysoftware.org/schema.html) to follow the connections between tables in the back end when designing forms.

    1.Gift Agent does not have a connection to Collection Object (it links to Gift). For the donor information, you could work through the Accession table. The Collection Object table links to the Accession table, which could link to an Agent identified as the donor.

    2. You could create a new Locality that includes that information or use the Verbatim Locality field in the Collecting Event table (or a Text field in Collecting Event).

    3. When you create a record set from a query, I think it carries over the sort order selected there (so maybe there was no sort order picked during the query design?)

    4. I’m not sure I understand, but when one is setting up Specify, I recall there was a choice about whether PaleoContext is linked to Collection Object or Collecting Event. Perhaps it was Collecting Event in your configuration. Changing this after establishing a database could be problematic.

    5. I see a CollectingEventSubform in common.views.xml that has a few labels and fields. Is that it?

    Good luck!

    #3262
    Avatarlafrench

    Thank you so much for helping me out and for your quick response.

    Your advice has allowed me to fix most of the problems. I cannot thank you enough for your help. I have worked very hard on customizing my forms, but with no help available from others involved in my collection and almost no experience with this type of thing, it has been difficult to say the least. I am still having issues with my first question.

    1. When I first started customizing my forms, there was an Accession field at the very top of the Collection Object Form and I got rid of it. Now that I am trying to put it back, I get an error message every time. All I did was copy and paste it from the commented out section. It should be exactly the same as the original default from when I first started using Specify. The error message is just telling me that something unexpected happened which is not very helpful.

    Again, any help that you can provide would be very appreciated.

    #3263
    Avatararountre

    No problem! It’s hard to say what might be wrong without seeing the file. Are the view and the viewdef both present and uncommented? It could also be something like a missing end tag or missing quote.

    #3264
    Avatarlafrench

    Nothing looks wrong to me in the views or viewdefs. Another weird thing about it is that I get that same error message every time I open the Collection Object Form, but I can still edit the Accession part of the Form and it saves it. So it looks and works just fine, but I still always get an error message. I am not sure if this means there is a deeper problem or what.

    #3269
    Avatarlafrench

    Turns out the problem was not with the Accession Info as I thought. Now I am not sure what is wrong. I went to investigate the error and Specify seems to think it is a problem with line 1 in Paleo.views xml. This cannot be it though, because I have not touched line 1 in paleoviews. I even compared it with the original default form on Specify Github and it looks exactly the same. I have no idea what the problem is now. I realize that no one else can probably tell me without looking at my collection xml. I am thinking about going back to the default code and re-doing my entire form configuration in order to see when it stops working for me. Does anyone have any suggestions to try before just restarting from the beginning?

    #3270
    Avatarlafrench

    In case it helps, here is the error that comes up when I go to Help–>Show Log Files–>error

    Nested exception: Content is not allowed in prolog.Error error parsing XML: Paleo Views
    Error on line 1 of document : Content is not allowed in prolog.
    Nested exception: Content is not allowed in prolog.
    Error error parsing XML: Paleo Views
    Error on line 1 of document : Content is not allowed in prolog.
    Nested exception: Content is not allowed in prolog.
    Error error parsing XML: Paleo Views
    Error on line 1 of document : Content is not allowed in prolog.
    Nested exception: Content is not allowed in prolog.Error error parsing XML: Paleo Views
    Error on line 1 of document : Content is not allowed in prolog.
    Nested exception: Content is not allowed in prolog.
    Error error parsing XML: Paleo Views
    Error on line 1 of document : Content is not allowed in prolog.
    Nested exception: Content is not allowed in prolog.
    Error error parsing XML: Paleo Views
    Error on line 1 of document : Content is not allowed in prolog.
    Nested exception: Content is not allowed in prolog.Error error parsing XML: Paleo Views
    Error on line 1 of document : Content is not allowed in prolog.
    Nested exception: Content is not allowed in prolog.
    ok
    okok

    #3271
    Avatararountre

    The error implies something is coming before
    <?xml version =
    on line 1 of the file. Have you tried moving your customized xml file out of the folder and copying in the default Specify paleo.views.xml to see if it works without error? What were you using to edit the xml file? It is possible that the file was saved in UTF-8 encoding with a byte order mark (BOM) at the very beginning, which could cause problems.

    #3322
    Avatarlafrench

    Copying in the default paleo.views.xml works without error. I do not know why though. There is nothing before the

    <?xml version=

    on my customized forms. I have even tried copying the first few lines over from the default form and the same error came up. I am using Notepad to edit my xml file. There is no BOM at the beginning.

    It seems like the only thing left to do is to just recreate my forms. Thank you very much for your help.

    #3323
    Avatararountre

    I think Notepad might save with the BOM by default, which would explain why copying over the first lines would not work (if you are still saving with Notepad). Try using Notepad++ (https://notepad-plus-plus.org/) and set the encoding to UTF-8 (not UTF-8 BOM). There is a menu option to convert to UTF-8 (without BOM). Editing the xml will also be easier in Notepad++.
    -Adam

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.