New added field does not show in old version in Orbeon - upgrade

I want to modify a form definition and upgrade all old filled form data also. But when I try to add new field, I found old input form data can not show the new field. it means I can not fill a new value in such old form data. Basically it means Orbeon does not support upgrade old form data to new definition.
Specific steps to understand such problem:
Create a form with two filed: Name and Id. save such form and
publish as version 1.
Fill such form and save it.
Open the form definition and add a new field, such as Address. Save it and Publish it. When ask publish as new one or overwritten, choose overwritten the version 1.
Open the filled form data you can see there is no new Address field show up.
Maybe it's not the right way to handle upgrade old data to new definition. I think we understand my requirement anyway.

The recommended way to handle this is to use versioning: when you publish an incompatible version of a form definition, you publish it under a new form definition version. For example:
create and publish form definition with version 1
create form data with version 1
create and publish incompatible form definition with version 2
existing form data is read with the form definition version 1
new data created with form definition version 2 is read with form definition version 2
There is currently no support for upgrading existing data from one version to the other (say version 1 to version 2). We do have an RFE for a minimal version of that.
See also this blog post for more.

Related

Reset TFDMemTable to default (no field definitions) at Runtime

I have a raw TFDMemTable at design time. I only activate the same at runtime and simultaneously display data through a grid component. The fields will be defined at runtime depending of its source (API REST) and user case.
At runtime, I need to reset the TFDMemTable to its default. Meaning, remove all the fields definition and accept another fresh data and field definitions.
Currently, the fields set by the first ran during runtime was fixed and it is not accepting any new field definitions. I am contemplating on creating TFDMemTable at runtime but I still have to figure out. I am hoping there is a better way..
Real quick question: How can I reset the TFDMemTable to its default at runtime (no fields definition)?
UPDATE 1:
TFDMemTable will receive JSON data from API. This API throws data with unknown number of columns/fields. Meaning, it can only determine the fields upon received of JSON data. Hence, I'd like that each time I called API, the TFDMemTable should redefine all the fields to be able to capture the API fields.
So, from my understanding, if I could be able to reset the TFDMemTable I could avoid this issue.
You can use TFDMemTable.ClearFields to remove all of the existing field definitions.

SharePoint 2010 InfoPath Forms Library FileName

I have a forms library in SharePoint 2010, and have designed the InfoPath form to add/update content to that library. Let's say that I have a field in the InfoPath form called "CustomFileName" - so that every time that field is updated, the InfoPath file's name is changed to that.
Instead, it is creating a new File/Entry every time the "CustomFileName" field is updated. I tried using Workflows, but it isn't an option since the CustomFileName values sometimes contains multiple periods that break the Workflow.
Checklist:
In the Data Connection Wizard, I do have "CustomFileName" specified in the "File Name" field
In the Submit rules, I do have a rule for when the "CustomFileName" is empty - to use a Name+".xml" notation
We need the file name to be renamed instead of creating a new file every time. Over-writing is okay, as long as we can trace the version history.
Any help here would be much appreciated.

Select and Insert TFS build number into TFS database

I am trying to create custom build version number.
We already using some custom build template and have created custom activities. Now I am trying to add custom build version activity in our template.
My idea is to select last build and extract only number which represent number of builds. This is last digit and it can be e.g. 5.2.3.1032 (marked as bold).
Based on last digit I will create next build number and insert into TFS database.
I can also use UpdateBuildNumber activity to insert number, but is there way to select build number by querying TFS db directly? It is also good if is possible via PowerShell.
Thanks
It sounded familiar, in fact I wrote a post on this topic a while ago. Probably the code and details must be reviewed to work with recent TFS, but the general idea is still applicable.
At the core you use the IBuildServer.QueryBuilds method to read your build history and pick the information you need.

FileNet property for all versions of a document

As I understand it in FileNet each version of a document gets its own ID. And if you create a new version then usually the properties are inherited from the previous version. So each version of a document has its own values for the properties.
Now I would like to add a property which is valid for all versions of a document (all versions != document class) for the use in a plugin. But I couldn't find any support for this. The only ugly concept I could come up with is the following:
Add a new property
Add all information to the lowest version of the document and retrieve it from there (otherwise you would need to modify all versions on changes)
Add a subscription which empties the property when creating the 2nd version (0.2, 1.0 or 1.1 usually) of the document and prevents deletion of the oldest version
Is there a more intelligent way?
You do not need a special Version series property - Version series IS that property.
Most of the time you only care about the current version of the document which can be accessed through any version of the document or its Version series. If that is not the case then you will have to iterate through all the versions of the document which are, again, most conveniently accessed through the Version series.
Since any document at any point of time is associated with its VS, when you need a relation to the VS you must use VS object reference or its ID.

Rails Param Troubles - old vs new data

When I send form data in my rails application, I need to perform a function using both the original value AND the newly submitted value. Is there any way, upon submit, that I can carry over both the original value and the newly input one to be used in the controller?
Thanks much.
Two choices:
Add a hidden input field with the old value in your form
If you are using an ActiveRecord model and your form is changing
values on that model, you can use #person.changes to see a list
properties with their old and new value. See
http://apidock.com/rails/ActiveModel/Dirty/changes