how to dynamically show number of filled Fields in infopath - infopath

I Have a info-path with lots of fields and I want user to know the status of fields completed under each tab(View).
How dynamically I can show the number of blank fields still remains as a continuous Update

For each text field, create a corresponding integer field and give it a default value of 1.
Create rules on the text field that update the integer field depending on whether the text field is blank or not blank -- when the text field is not blank, set the integer field to 0. When the text field is blank, set the integer field to 1.
Create a calculated value that sums the values of the integer fields. This will tell you how many fields are remaining to be completed.
To make the answer readable I have assumed text fields but the same principle could be applied to other fields.
You can see a simple example here: https://dl.dropboxusercontent.com/u/9278601/fields-remaining.xsn

Related

MS Access: Count selected items in multi-valued field on a form

I have a Microsoft Access form with a multi-valued field. I'd like to display the number of items a user has selected to the right of that field. The field is called [Description]. The control displaying in red is =Count([Description]). It counts how many options there are in the [Description] field as opposed to how many have been selected. Any thoughts on how I can just count selected items?
It turns out that if my form is filtered for a single record, the formula works - it shows the number of items that are flagged in the Description field for that record.
If my form is not filtered (even though its 'Default View' property is set to 'Single Form'), it shows the total number of possible options in the Description field.
Very strange behaviour indeed.

In a PDF, How to auto populate one field using other field text?

I have a 54 pages PDF file. In this PDF, I have some fields like Full Name, the Phone number, etc that repeats more than 10 times. How can do like When I enter Full name one time and all of the remaining full name fields can be filled automatically using Adobe Acrobat?
I hope I asked my question clearly. Thank you for your time and help.
The easiest is, when all properties of the field (font type, size, color, etc.) are the same, to simply copy the field to the other pages.
The field value is a so-called field level property, which will be the same for all instances of the field.
If you want to have only one place where the value can be entered, and the dependent fields should be read-only, you would have to have a different name for the entry field and display fields. In the entry field, you would then add the following line of code in either the Format or onBlur event:
this.getField("myDisplayFields").value = event.value ;
And that should push the value from the entry field to all fields named myDisplayFields.
And that's it…

getting textfield output partly unvisible

In a Drupal content type a need to get the output of a field partly unvisible. These are bank account details, the IBAN.
Normally the field shows 1234567. I need to get xxxx567. I need to show only the last 3 numbers/letters.
Also I need this output in field edit form.
On the display end you could change the output using a simple PHP function in the theme template by grabbing a substring of the field's last three digits and concatenating it with "xxxx" before printing.
You might also consider doing this at the formatter level by using the 'custom formatter' module perhaps?
https://drupal.org/project/custom_formatters
To do this on the edit screen is trickier. I suppose you could do a hook form alter to use PHP to change the field value, but I am afraid you will rewrite the field value when you save the node with the 'xxxx' instead of the real data.
I wonder if it would make sense to 1.) hide the actual field, 2.) create a dummy field that displays the text formatted as "xxxx567" to the user, and 3.) write some javascript that populates the hidden field with the visible field's value if it is changed. Presumably the form would still throw values if the hidden field did not meet formatting requirements.

Conditional fields and views

I have five multigroup fields each one are displayed by a conditional field with a 1 to 5 value. If I select for example 2 there's a select list field appearing with is selected data , if i select 1 there's another one with an another select data.
How do I display with wiews only the content of the choosen value of the conditional field.
Thank you.
The simplest way of doing this, would be to create the logic in your theme. There are many ways of doing this, one would be to add all of the possible fields, but exclude them from display, and only show the conditional field. In one of the preprocess functions for the view, you could check the raw data for the conditional field, and replace either the field, or just the the themed value, with the value of the field you want to display.

Drupal Views combine 2 columns into 1?

I've got two content types, both have a node title and a document attachment, the doc attachment fields are different names (being from two different content types).
In my view, I'm displaying the node title and the file name in a table. The node titles are great all in one column, but the two content typed attachment fields are displaying in two separate columns, making three columns total when there should only be two. Every row has a single doc title, but one or the other column is always blank now depending on which content type's doc title is displayed.
How can I combine these two fields to display in the same column so it looks seamless? It is not important to know that these docs came from two different content types. These are organized by larger taxonomy terms so it's not feasible to just do two different views.
Alas, the answer was right in the views help:
Column
By default, each field is its own
column. However, you can place
multiple fields in the same column. To
do this, pick which field you want to
represent the column, then pick
another field and set the 'column'
value to that field. You can place as
many fields as you like in a single
column, but only the main field in a
column can be click-sorted.
I found this answer and it works for me:
http://drupal.org/node/1120304#comment-5111606
You can use any field as a token in another field in the default Views module.
So if you want to concat text fields together, say you have field A with value "Hello" and field B with value "World" and you want a concat field with value "Hello World":
1) Edit field A, choose exclude from display, do the same thing with field B
2) Create field C as Global: Text and ensure that it is ordered after field A and field B (you can only use fields as tokens if they are defined before the target field).
3) You can now see the replacement patterns available to you just under the value textarea in field C. It will be something like [field A] [field B]
Now if you want to calculate a number field based on 2 other fields the method is similar to concat, except for field C you would use the Global: Math Expression field:
1) Edit field A, choose exclude from display, do the same thing with field B
2) Create field C as Global: Math Expression and ensure that it is ordered after field A and field B (you can only use fields as tokens if they are defined before the target field).
3) You can now see the replacement patterns available to you just under the value textarea in field C. It will be something like [field A]+[field B]

Resources