The addition of two fields of digital type in livecycle es2
Hi I created a form in the es2.
I have t2 and t1 numberic two fields for both. I want to add the total of the t1 and t2 and total to appear in the 3rd field tot.
so now calculate it using javascript I tried this
topmostSubform.Page1.tot::calculate - (JavaScript, client)
var
AD1 = this.getField("t1").rawValue;
var
AD2 = this.getField("t2").rawValue;
var total = AD1 + ad2; tot = total; where tot is the name of the 3rd digital field but it does not work. I really appreciate if someone can tell me what would be the correct code to do this.
Hello
this.getField () is the core/AcroForm javascript. LC Designer javascript syntax is different.
Try this javascript in the calculate of tot event:
tot.rawValue = ad1.rawValue + ad2.rawValue;
.rawValue access (and games) the value of an object.
Good luck
Niall
Tags: Adobe LiveCycle
Similar Questions
-
get the value of two fields in a field
Hellou,
I need some new help with javascript
Currently I use the below code to get the value of one field to another:
getField("Text35").value = getField("Text1").valueAsString;
Now, I wonder how to change this code, so I could get the values of two fields in one. I for example field 'Name' and 'name' field, now I want to show in the field 'name '.
Example, if the firstname field have John value and the value of the lastname field is Doe, I want to show in the field name as "John Doe".
I hope that u understand what I want
Thank you for helping me!
getField("Text35").value = getField("Text1").valueAsString + "" +.
getField("Text2").valueAsString;
-
the addition of two unequal dimensions 2D arrays
Hello everyone,
Once more, I have a very basic question. I try to add two tables with different line size 2D. the function "create array" creates a 3D Board. I use the array function to reshape to convert 3D table a table 2D. It works fine if I have two table of the same size, but if the size of the row of the first table 2D is less than the second, it is added an additional line of zeros between the two. I can understand why she is doing this, but I don't know how I could avoid it. is there another effective way if the addition of tables without creating a 3D table?
The example I've been working on is attached.
Thank you!
odessy27 wrote:
the function "create array" creates a 3D picture
This function table build a right-click and select "entries to concatenate" and you will get a table 2D.
-
Need help to split the string into two fields
Can someone share your thoughts by dividing the prod_info string below into two fields
For example:-TABLE of PROD
SOURCE TABLE
SNO PROD_INFO 1 20 OZ SIMILAC 2 HW PRO 10 3 REX 10 OZ 4 AAA 10 5 BBB 2000 6 CCC 10 LB 7 DDD 2021 8 EE 12 KG 9 KK 11111 10 ZZ ABC FAC 11 11 RKW DD CC 12 OZ 12 12KJ 12 LBS. EXPECTED RESULTS
SNO PROD_INFO PROD_VAL 1 SIMILAC 20 OZ 2 HW PDR 10 3 REX 10 OZ 4 AAA 10 5 BBB 2000 6 CCC 10 LB 7 DDD 2021 8 EA 12 KG 9 KK 11111 10 AEC ABC ZZ 11 11 RKW DD CC 12 OZ 12 12KJ 12 LBS. with
as Prod
(select 1 sno, "SIMILAC 20 OZ" prod_info of all the double union)
Select 2, 'HW PDR 10' from dual union all
Select 3, 'REX 10 OZ' from dual union all
Select option 4, "AAA 10' from dual union all
Select 5, "BBB 2000"of the dual union all
Select 6, 'CCC 10 LBS' double union all
Select 7, 'DDD 2021' from dual union all
Select 8, 'EE 12 KG' from dual union all
Select 9, 'KK 11111' Union double all the
choose 10, "ZZ ABC FAC 11' from dual union all
Select 11, 'CC DD RKW 12 OZ' from dual union all
Order 12, '12KJ LB 12' double
)
Select sno,
(prod_info regexp_substr(prod_info,'^((\d*|\w*)[^[:digit:]].*) \d',1,1,null,1).
regexp_substr (prod_info,' prod_value (\d+.*)$',1,1,null,1))
Prod
SNO PROD_INFO PROD_VALUE 1 SIMILAC 20 OZ 2 HW PDR 10 3 REX 10 OZ 4 AAA 10 5 BBB 2000 6 CCC 10 LB 7 DDD 2021 8 EA 12 KG 9 KK 11111 10 AEC ABC ZZ 11 11 RKW DD CC 12 OZ 12 12KJ 12 LBS. Concerning
Etbin
-
fields of digital type in the table editor can be too small
Hello
just a minor inconvenience: depending on the settings of digital numbers may not fully appear in the table editor, refer to the figure below where a digital precision of 15 has been set with scientific notation. Of course, these values are used to display the stepsize in the editor, too... Because it is possible "scroll" the number is not a real problem, but it is not very nice either
Hi Wolfgang,.
I could reproduce this behavior here on my end. I'll take it then they can handle it for the next version of the CVI.
Best regards
Manual
-
Is there an easy way to filter a 2D table based on the values in two fields?
Y at - it an easy way to filter a 2D table based on the values of one of the fields. In my attached VI the output array has the following format:
Ident Frame Type bytes TimeStamp data
10:57:07.621 3AD00016 POUVEZ 8 0000000000000000 data frame
10:57:07.622 3AD00017 CAN data frame 8 000005E000000000
10:57:07.624 3AD00018 POUVEZ 8 0000000003300000 data frame
10:57:07.625 2DC00000 POUVEZ 8 0000000000000000 data frame
10:57:07.626 3AD00019 POUVEZ 4 0000030000000000 data frame
I would like to delete all lines that do not have an "Ident" between the values of 3AD00000 and 3AD0001E. So for the data above the fourth row would be removed. The only way I can see to do this is to form a 1 d table. Is there a better approach?
Thank you.
Hi chuck72352,
After you've sorted your data, you can use the function InRange. Combined with a "search in 1 table D", you get the range you really want.
Mike
-
The combination of two fields of object a
Hello
I have an array of objects related to my DataGrid.
How can I have a column shows the two LastName + initial of the first name.
Name and first initial are individual values in the object.
< mx:AdvancedDataGridColumn
ID ="Full name " headerText =" name " dataField =" (lastName) + (firstInitial) " "visible =" true " " / > ""
I tried this and a few other variations, none doesn't seem to work.
TIA.
Use labelFunction
-
Limit the number of numbers entered in the field of integer type in LiveCycle
Hello:
I have a numeric field on my form that I need to limit the number of numbers entered 4 only. The field can have zeros... Is their a way to do this?
I send you the code for NumericField only...
.length is a java script method that returns the length...
The error that you got may be because you have not set your Java script scripting language and the code must be in case of change...
The sample is attached...
https://Acrobat.com/#d=4yJTgBa-x9Hn-bEbb0VV-w
Thank you
Srini
-
Returns the lowest value of two fields
Hello
I have two domains that users manually enter in a form. Value1 and Value2.
Someone at - it suggestions on the best way to use JavaScript to return the lowest value of the two fields?
Thank you
Natalie
I think I misunderstood what you mean by any, I thought you wanted the calculated value to be None. The two fields value digital formats and modify the script for:
Custom calculate script
(function () {}
Initialize the array
aNums var = [];
Get the field values as strings
var s1 = getField("Value1").valueAsString;
var S2 = getField("Value2").valueAsString;
Convert values to numbers if not empty and add to the table
If aNums.push(+s1) (s1);
If aNums.push(+s2) (s2);
Set the value of this lesser field of entries
If both are blank, this field blank
Event.Value = aNums.length? Math.min.Apply (null, aNums);:
})();
-
Hello..
I have a form with three fields with any type of char with length 5 data. I want to add Field1 and Field2 and save the result in field3.
Data in Field1 and Field2, time in char format. I want to add these two fields and save the result in field3 as tank.
But the addition of these two fields should be similar to the addition of two time values.
Ex:
Field1 = 04:30 and 05:30 = field2
where in Field1 * 04 * refers to the hours * 24 HR format * and * 30 * refers to the minutes.
Thank you..Try this
:filed_3:=LTRIM(TO_CHAR(TO_NUMBER(SUBSTR(:FILED_1,1,2)+SUBSTR(:FILED_2,1,2))+TRUNC(TO_NUMBER(SUBSTR(:FILED_1,4,5)+SUBSTR(:FILED_2,4,5))/60),'00'))|| ':'||LTRIM(TO_CHAR(MOD(TO_NUMBER(SUBSTR(:FILED_1,4,5)+SUBSTR(:FILED_2,4,5)),60),'00'))
Hope this will help you
If someone useful or appropriate, please mark accordingly.
-
How do I calculate that in the script? I have 3 domains. A field is a constant date mm/dd/yy. The second field is a digital number (1-120) and can be changed. The third field calculates two fields 1 and 2 in the summation and shown in mm/dd/yy.
You searched for ' add days?
You must write a custom for this JavaScript calculation because you cannot add a number any date. Also the date strings are not just a number, even if we can convert a given date in a number for that date that represents the time form a date date (Epoch). Witn this value, we can achieve them all kinds of date calculations and collect a little information about the date. JavaScirpt uses midnight on January 1, 1970 UTC for starting point or the date of the time. Its value is zero, and every millisecond increases the value of 1. When a date string is converted to the date object JavaScirpt we have access to many properties of the date and can use several methods to extract information or adjust the date object.
Field 1 is in the format "Date" with a format of "mm/dd/yy".
Field 2 is in «Number» format with 0 decimal.
Zone 3 is in the format 'None '. The custom calculation script applies to the formatting.
The custom for JavaScript calculation area 3:
var cField1 = this.getField("Field_1").valueAsString;
var cField2 = this.getField("Field_2").valueAsString;
Event.Value = "";
If (cField1! = "" & cField2!) = "") {}
Console.println (cField1 + "" + cField2);
calculate that if we as no null data;
var cDateFormat = "mm/dd/yy";
convert start date date object.
Kai var = util.scand (cDateFormat, cField1);
get the date of the month;
David var = oDate.getDate ();
Add field 2 number of days;
David = Number (nDate) + Number (cField2);
of being updated for the new date.
oDate.setDate (nDate);
Set the field to update formatting;
Event.Value = util.printd (cDateFormat, letter);
} / / end of data not null;
-
How to calculate the sum of two digital form fields based on the selection of the checkbox.
I have a form in Acrobat Pro who needs a custom calculation. How to calculate the sum of two digital form fields based on a selection of the checkbox. I have three number fields. Field-A and B are simple one or two digits. Field-C is the sum, or the total field. I want to field-C have a control box which, when turned on and off, just gives a. gives the sum of A + B
_ Field - 2
_ Field - A 4
[check] _ _ field - 6 C
[disabled] _ _ field - 2 C
Thank you
The custom field C calculation script could be:
(function () { // Get the values of the text fields, as numbers var v1 = +getField("A").value; var v2 = +getField("B").value; // Set this field's value based on the state of the check box named "CB" if (getField("CB").value !== "Off") { event.value = v1 + v2; } else { event.value = v1; } })();
Replace 'A', 'B', and 'CB' with the real names of the fields.
-
Function editor does not support the pointer to the digital type
Am I missing something or is it true that the CVI function Panel Editor does not support specifying a type parameter as a pointer of type number?
I see no reason why he wouldn't or shouldn't. It supports the pointer to char. And it supports a table name (which, in C, is a pointer to the first element of the array).
I guess I could use the array form as a pointer, but surely it's confusing when dealing with a simple pointer to a numeric scalar type.
I am using the function Panel Editor only for the purpose of creating a dictionary of type so I can call functions DLL in VB. Y at - he know somewhere how CVI types could are mapped to the VB types when you use the type dictionary? for example, what happens if I use an unsigned int in a function parameter (VB does not support unsigned integers)?
Menchar
Hi Menchar,
To create a pointer to an integer as a parameter to a function panel, you have two different options.
First of all, all output parameters are defined as the default pointers. So if you create an output parameter of type "int", he creates a ' int *' parameter.
Second, if you want it to appear in the entry list, you can create a data type in CVI which will appear at the bottom of the list. Data types to change your data types, go to the Options"(you must have a function Editor tab open and selected Panel to make this option available). Enter the name of the type (in this case ' int * ') and click the Add button. The new "int *" option should now appear at the bottom of the list.
Third, you can use the array form (int []), but as you say, which can be confusing for other people looking at the code. Or the other of the two first options are better choices.
As for your second question, here's a link to a page MSDN showing types in Visual Basic and their representations .NET: http://msdn.microsoft.com/en-us/library/47zceaw7 (VS.80) .aspx. This allows to make a comparison between VB and ANSI C data types. For example, to ask on unsigned integers, and this site shows that Visual Basic has an Integer type (-2,147,483,648 through 2,147,483,64) and an unsigned return, UInteger (between 0 and 4 294 967 295). From what I can tell, VB has signed versions of all its digital representations. You can then take this with a list of ANSI C data types to convert between the two. A list of ANSI C data types can be found here: http://www.exforsys.com/tutorials/c-language/c-programming-language-data-types.html
-
Measure the time between two digital pulse
Hello
For a non-critical calendar application, I need to measure the time interval between consecutive TTL pulses, ranging from the order of 0.5 s for a few seconds, with a low accuracy of +/-10-50ms. The interval being measured varies between the rising edge of the first pulse and the front of the next and so on.
I have several input lines I need to deal with. Because it's a critical machination low cost, I don't want to use digital counters for each line, so I work with an acquisition of data USB6008 and have connected the input rows TTL on the digital inputs of the device. Avoiding will be sufficient.
I found a good example of VI on discussion forums that does almost the same thing, only it uses instead of the DAQ Assistant user input. The VI works including the time the program going on in a while loop. I replaced with the DAQ Assistant output (a channel) user input in the hope that it is still work.
When I run the program in "run once" mode, it seems to work perfectly. However, in "continuous run" it measures only a very small interval, probably just the time between two samples. I think it has something to do with the help of a while loop in combination with the DAQ Assistant. Anyone who has any suggestions how to solve this problem?
Thank you!
OK... first of all, you should never use the button "run continuously. I wish that NEITHER would be to eliminate it, but told me that it is sometimes useful for debugging. If you want your program to run over and over again, use a while loop with a stop"" button.
If I'm reading your code correctly, you make your initial moment, and then collect data from data acquisition. When one of the channels is "T", you stop your loop and the end time of capture. (By the way, why you convert your table to a cluster? Why not just index the appropriate channel in the table directly?)
Since you want to capture the time between two consecutive pulses, you need to know when a transition has occurred... i. e when your digital line went from F (no pulse) to T (pulse start). This will give you your forehead. Right now, all you're doing is looking for a value T - so you have no way of knowing if you are looking for to the previous impulse again, or a new impetus. You also burn 100% of your processor with the way you have your programme in place.
You need a small loop delay so that your VI is not 100% of your hogs CPU time. Given that you can live with an accuracy of 50msec, what I suggest that you use.
See attached picture for you give an idea of how to implement. He will probably need some refining operations, but it should point you in the right direction.
I hope this helps.
-
How do to allow the addition of attachments and more filled in form fields and signing of signature field when creating a secure pdf document?
You must allow commenting as well. Reader users will be able to add attachments as comments. You can also use JavaScript with Player 11 and DC to automate the process somewhat.
If you need users of Reader in order to add attachments as Acrobat can, you need to add the right of use of file attachments, but you can't do that with Acrobat.
Maybe you are looking for
-
Re: BSOD problem was detected on the Satellite L40 - 14N
Hello have been unable to fix a fault on my laptop. BSOD problem has been detected and windows has shut down. I was told by someone that this was resolved when they replaced their hard drive. Could someone tell me what hard drive I need to get?Once I
-
How can I remove Microsoft Download center of my office, I downloaded the malware removal tool and do not want to
-
How can I make winxp work if I replace the motherboard or my HARD drive;The question another way: I want to install Windows XP on the motherboard so I'll have to take the hard drive and connect it to another motherboard... How can I make because it o
-
List of compatibility with VMware 6.0
We have HP ProLiant DL 165 of the G7 which lie on the VMware esxi 5.5 but not 6.0 compatibility matrix. I looked at the CPU, controller raid and network individually adapters and they all appear as being compatible with 6.0. We want to move to 6.0
-
I keep all my programs up-to-date using the toolbar creative Cloud. However, last week, I updated my InDesign and tried to open it and the Rainbow wheel continues to turn. My Illustrator and Photoshop work well, which have been updated as well.I shou