Double data entry system using Infopath 2007 how to compare 2 infopath documents for differences? - infopath-2007

How to compare 2 infopath documents craeted using double data entry system for
differences ?
We have a small project contains few infopath forms. Client is using double data entry system to reduce the errors. We are maintaining entry number in infopath form to seperate each entry.
Note: I know we can compare xml data
files of 2 documents. (xml data file
has field names like field1,field2 and
so on..while on form that field1
represent some meaninngful text) But
the question is we want to compare it
Visually side by side. Any difference
should highlight the field.

The easiest way I can think of is to use a different "comparison" form (instead of trying to alter the original). The new form can have two columns - two fields for each original field. You can load the two documents to compare into datasources (even make fields at the top which prompt for which two docs to compare). One shows in the left column and another in the right. Then just use conditional formatting to highlight where the first column doesn't match the second, or even hide the fields where they are identical so only the differences are visible.
If you want to get really fancy you can even let the user specify or change the values on the form and have them save back to the originals or create another new "merged" version.

Related

Fields on form, selected from data source are not available when using Me

I have two fields on a form. Field 1 is auto number field named 5sID. Field 2 is a lookup field named 5sType.
When I open the VBA code for both the oncurrent and on open, I try to reference either field with a "Me.5sID" or "Me.5sType". In either case when I type in the "Me." the auto list shows the other eight fields in the table, but not these two.
I have used this for years on both datasheets or continuous forms. There are only the two fields on the form and they were selected from the table field list in the design view.
If I change the name on the Other tab of the property options, the fields then appear.
I have now rebuilt the table and the form, I have created a database and linked to the same table and still get the same results.
If I add another short text field it shows up when I type "Me." in VBA, but any other type of field does not show up.
Naming an identifier with a number as first character is a bad idea! Always start with a letter!
On Access 2013 that creates a compile error as the compiler expects a=as he interprets.5as a decimal-number.
That worked for you on older versions? Hard to believe!
As workaround use square-brackets like on identifiers containing spaces or other crap.
Me.[5sID]
or turn onShow hidden Elementsin Object-Browser , what fixes Inteli-Sense and creates automatic brackets. Seems like this is a way to create hidden members ;)

Access Database to store and create different versions of a report

I am trying to create an Access database that can be used to store, create, and update slightly different versions of the same report. There are currently 190 records in one field containing what will be the body text (long text data type), and each of those fields will be stored in that table 11 times (one for each different version of the report). These all need to be that way because all of the fields will need to be updated at-will, and then reflected in the report.
The problem is this: I need each of the text fields to be formatted a certain way (bulleted lists, letter lists, headings, body paragraphs) based on criteria. My original thought was to specify and define those criteria in another table and then link it to the report table, but I'm not sure if that will work.
I currently have a query that pulls all of the text fields from one version of the report, but I can't figure out how to format correctly. How would I go about including lists/paragraphs/headings into a report?
Edit: Records, not fields

Best way to handle multi-valued fields as a view/grid

In several notes applications, instead of handling related data as separate documents, if the size of the data is small (less than the 32k limit), I'll make several multi valued fields and display it in what I call a "List Panel". It's a table where each column displays one multi-value field. Since fielda(1) goes with fieldb(1) that goes with fieldc(1) there is a concept of rows. (I did a similar thing in my auditing routine discussed here )
It is always assumed that each field has exactly the same number of elements.
All the multi-value fields are then stored on the single document. This avoids several coding conventions that made my eyes bleed like having date changed, who changed it, new value fields for each field we wanted to audit. Another thing that this kept to a minimum was having to provide multiple fields for the same thing that locked you into a limit. Taxrate1, Taxrate2, Taxrate3, etc...
In my "Listpanel" the first column is a vertical checkbox. (One for each element in my lists) This is so I can select one item to bring up and edit, or select multiple values to delete "rows" or apply some kind of mass change to them.
What would be the best way to handle this under xPages to get this functionality? I tried making a table but am having the devil of a time to get the checkboxes to line up with their corresponding data items.
Views and dojo-grids seem to assume we're using a document for each row.....
This TableWalker may provide what you want http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Tutorial-Introduction-to-XPages-Exercise-23
It was created when XPages was all very new, so it's SSJS rather than Java. But if you're comfortable wiith Java, converting it probably won't be a challenge.
You could use a repeat control to display the values and build a table using the table row tags in the repeat. You would want to calculate the id of the checkbox to be able to take an action on that selected row. The repeat var would be just one of your multi-value fields and you use the index of the repeat to get the value for that row from the other multi-value fields.

How to handle search for custom fields in form for FROM and TO fields?

I have just started implementing search module in a project, where I have a form with fixed fields consisting of combo box, text box, radio button etc (around 200 fields in multiple tabs), and later client should be able to add extra fields too. Once user fills the fields which he wants to search, that search criteria also he should be able to save. For all these reasons, for each field I am associating metadata in the following format.
"EntityName.attributeName": attributeValue
Once the user fills the form fields to search, I will validate form data and and only non empty fields metadata I am sending to server in JSON format. Everything is fine till now. But I am facing an issues now.
Using the metadata of each field I will create a new criteria for each field. but if there are fields where one field metadata depends on other field metadata I am struck.
In the form I have few special category fields in following format : for example DOB,
FROM DATE (meta data: entity1.dob)
TO DATE (meta data: entity1.dob)
both fields belongs to same entity and same column only field name in the UI is different
Like this I have around 20 fields which asks for FROM and TO to query the range (it need not be on date, for example no of bed rooms..it can be on integer, string etc)
My query formation should be in the following way depending on user search criteria. If user entered only FROM field of number of bed rooms then I have to query using EQUAL to operator in sql and if both mentioned then MORETHANEQUAL to for FROM field and LESSTHANEQUAL to for to field. So how I can handle this special case ?
like if he entered number of fields as 4 in TO field of number of bed rooms, then I have to query for houses having number of bed rooms equal to 4. but if in FROM he entered 3 and in To if he entered 7 then I have to query for houses having greater than or equal to 3 bed rooms and less than or equal to 7 bed rooms.
Since I have same metadata for these category fields also I am unable to proceed, to achieve this, what kind of metadata I need to prepare ?
How I can generalize this process to handle all the cases ?
my technology stack: ExtJs, Eclipse Link, spring.
and what are the best practices to follow to support custom fields adding feature in Forms in enterprise applications ?
Off of the top of my head, I would create wizards for these particular cases. So for example, have a custom wizard that allows the user to define a "from" field, a "to" field, and then the comparison operator in one action. This wizard could also be responsible for adding custom properties to the generated fields that could be used by your validation routine. So based on the combo of from, to, and operator, you could create a flexible validation mechanism for ensuring that correct values are entered, ranges are correct, whatever.
You might consider this "wizard" approach for all custom fields, in fact. I could see you predefining all the possible custom field types that could be used and create classes that can be used for those. The classes could be responsible not only for the field creation, but also for providing any custom validation, pre-submit transformation, etc. This approach would make adding new custom field types incredibly simple since all you'd have to do is follow the same implementation as the others that already exist, extend an existing one, etc.

Appending Multi-value lists

I have an Access 2007 data entry form that is bound to a table that is used solely as a holding station for the data until it is reviewed and appended to the permanent tables. There are several fields in the table (and thus form) that have multi-value selections (derived from a look-up table query). The user does not care if the data is searchable so storing in the text field as a long list is fine. The problem is with appending. I cannot append multi-value lists to a table.
I noticed that if I save the table as an excel spreadsheet and then import it back into a table with the same database structure as the exporting table but without multi-value combo boxes for those fields requiring multi-values (they are now just text boxes) that the list is there and formatted the way I want.
So I am thinking, what code is Access using to export the correct values to Excel and could I just use similar coding to append to the permanent tables (which don’t have to have the corresponding text fields formatted as a multi-value list) instead of having to export to an Excel file and then import this back into a new template? Please note that although some of the lists are only 10-15 options, one list has over 50 possible selections to choose from.
I am just trying to make a user friendly data entry interface without scores of vba coding (which I am a newbie at). Alternate ideas are welcome.
Internally, Access is doing just what Allen Browne's ConcatRelated function does. Fortunately, Allen's code will handle multi-valued fields so you can just use it in a query like this
INSERT INTO MainTable ( MealType, Meats )
SELECT MealType, ConcatRelated("Meats","TempTable","TempID=" & [TempID]) AS Expr1
FROM TempTable;
where [MainTable].[Meats] is Text(255) and [TempTable].[Meats] is a multi-valued Lookup field.