Show both the scripts, please.
"I updated the JS algo as advised but nothing changed. Still works on desktop and still displays NaN on mobile.
Maybe you guys can suggest me an alternative algorithm using the Calculation field instead? That seems to work fine but I don't know how to use it when it comes to multiple-choice check boxes.
Thank you"
In my opinion, it would be better to debug the JavaScript, rather than give up on it. Neither I nor Eugene (I believe) have experienced JavaScript to be failing in Memento, although one does have to understand the context of a JavaScript field and that of a trigger script.
The script as Eugene wrote it works on Eugene's tablet, on my tablet, and on my phone. I am running release 4.1.0 on a Samsung Galaxy Tab S2 and a Samsung Galaxy S6 running Android 6.0.1. What are you running? Do you have the box checked to load the moment.js library?
While Vasya's assertion in his User Manual was that any UTF-8 string may be used as a field name, I think mine in http://wiki.mementodatabase.com/index.php/Field is more accurate. He probably wrote that before there was such a thing as a Calculation field or any JavaScript. I'll (eventually) test all the field names I can think of with special characters in certain positions that would result in expression evaluation errors and document them in the wiki. But in the meantime, people should just be wary of leading or trailing special characters and probably also of embedded special characters in file names.
Then, the only resort I see is to make a copy of the library's structure, fill it with a couple of fake data, upload it to Memento Cloud. You will be offered to share it with other users. So, you provide a temporary public access to your library and provide the link to us. I could be anything - names, scripts, order of fields... After trying it on onther devices and seeing what's wrong, you can revoke the access.
Otherwise, we are not able to reproduce the problem.
- The Libraries List screen
- 3-dot menu on library icon
- Copy
- Structure Only
Fill it with a small amount of fake data
- Just create enough entries (probably just one or two) to fully demonstrate the problem
Upload it to Memento Cloud
- The Libraries List screen
- 3-dot menu on library icon
- Upload To Cloud
- "Uploaded" message. Press NEXT button
- Message. Press PERMISSIONS button.
- Cloud card. Who has access > Public Access
- Edit Permissions card. Change all Deny to Allow.
- Press checkmark.
- Back to Cloud card. Press Library Address at top. Select your email client.
- Enter Eugene's and my email addresses
- Send email.
Later, revoke access
- The Entries List screen
- Swipe right-side left to bring menu out
- Press Cloud, get Cloud card
- Press Who Has Access > Public Access, get Edit Permissions card
- Press Trash Can icon and then YES
- Optionally, on Cloud card, press 3-dot menu > Delete from cloud
Thanks, Eugene.