I have let's a form with 2 levels. At the first level my 'key' field is a text field with default value as util: uuid (universal id 36 characters). As I collect data, every entry receives a unique uuid. All fine, but the problem is that if I change anything in the survey design (e.g. updating a code listto add new options) and then publish the changes successfully. Then the pre-existing data have had their value in the field uuid recreated. As I am using this Open Foris Collect with a link to another database, it very unpractical. Pre-existing data are not modifiable automatically just by publishing, why would a uuid recreate itself? Any help with this? Best wishes, Bruno asked 23 Jan '19, 13:40 bsenterre |
Dear Bruno, Why do you need a uuid field to identify your records? Is there any other combination of attributes that makes a record unique? Collect supports up to 3 key attributes per sampling unit. Many thanks, answered 24 Jan '19, 17:20 Stefano (OF) ♦♦ |
Dear colleague, Thanks a lot for your help. Yes indeed I am using a combination of attributes as unique ID. But the thing is that I only use Collect as an intermediate database and I actually store my data un another database. This means that in my other database I have to recreate the concatenation of the attributes making the unique ID key (no big deal). But to be on the 100% safe side, I would have preferred to use the uuid util function of Collect as a 'calculated' attribute (so it can never be modified after creation and as a key (but be also cannot make 'key' calculated attributes in Collect). If we cannot do that with the util uuid function, then this function is quite useless actually, and user has to stick to combination of attributes anymay (which you never have a garantie that a given object will never change its key ID, in case any of the combining attributes is modified. I also tried to make the uuid attribute as a default attribute rather than a calculated one, but it still recreates these uuid for pre-existing entries each time I re-publish the survey. Besides small details, Open Foris Collect Mobile is an absolutely great tool! Thank you for this great piece of work. Bruno answered 25 Jan '19, 03:00 bsenterre |
Dear Foris team, I notice that you have implemented the "calculated only once" option for calculated attribute, having in mind the issue of uuid attribute being recreated each time in Foris. This is nice but it seems not to solve my issue since I cannot set as "key" a calculated attribute??!! Therefore I still cannot create a key attribute which is a uuid calculated only once. If I create a key attribute not calculated and having a uuid as default value, it is still recreated each time I export data from Foris. The reason I need this is because I do not store my data in Foris but in another database system. Is there a solution, other than having to always create unique IDs by combination of up to three attributes? Thanks a lot, Bruno answered 19 Jul '19, 11:51 bsenterre |
Dear Bruno, answered 19 Jul '19, 23:22 Stefano (OF) ♦♦ |