How to hide a calculated field if value is 0?
I want to hide a field that is calculated (sum of two other fields) and shows as 0.00 - How can I hide 0.00 until this field is calculated? I am using Adobe Acrobat Professional 8.
Thanks!
You have to use a custom calculation script, something like:
// Get field values, as numbers
var v1 = +getField("Text1").value;
var v2 = +getField("Text2").value;
// Perform the addition
var sum = v1 + v2;
// Set this field value
if (sum !== 0) {
event.value = sum;
} else {
// Blank this field
event.value = "";
Or equivalently:
// Get field values, as numbers
var v1 = +getField("Text1").value;
var v2 = +getField("Text2").value;
// Set this field value
event.value = ((v1 + v2) !== 0) ? (v1 + v2) : "";
This code assumes the input fields have a numeric Format category. Replace "Text1" and "Text2" with the names of your fields.
George
Similar Messages
-
How to Hide the Parameter field at run time....
Hi,
I have a parameter field which behaves differently depending on the User logged in.
It has the LOV coming from following SQL.
SELECT customer_name FROM Cust_mast;
If the user = 'INTERNAL' then the Where clause will be
WHERE cust_id in('DELL', 'SBC', 'BANK')
Else there will be no WHERE clause or the parameter field
should be hidden in the parameter form.
So my questions are:
1) How to hide the Parameter field during Run time?
OR OR OR
2) How to change the LOV select statement during Run time?
Thanks.
Ram.Hi Ram,
Is there any way to play with the sql query SELECT using DECODE ?I'm not sure of this part, maybe someone else can suggest a way.
However, what you want can be done in 2 other ways:
1. Build 2 reports. Both reports will just be duplicates of each other, only difference being that the 'LoV where clause' will be different. Now you can fire the appropriate report in many ways. For example, if the customer is alreay logged inside your custom application, and therefore you already know whether the user is internal of external, you can design your button or link which launches the report to contain logic such that one of the 2 reports is fired depending on who the user is.
1. Use a JSP parameter form, not a paper parameter form In this case, just build an HTML parameter form in the web source of your report. Use Java logic to populate the LoV drop-down list. When you have to launch the final report, just launch the paper-layout of the report. For example (you will have to modify this):
<form action="http://machine:port/reports/rwservlet?report=ParamForm.jsp+..." name="First" method="post">
<select name="selected_customer" onChange="First.submit()" >
<option value="">Choose a Customer Name
<rw:foreach id="G_cust_id" src="G_cust_id">
<rw:getValue id="myCustId" src="CUSTOMER_ID"/>
<rw:getValue id="myCustName" src="CUSTOMER_NAME"/>
<option value="<%=myCustId%>"><%=myCustName%>
</rw:foreach>
</select>
</form>
In the code above, you will have to make sure that your report's data model defines 2 CUSTOMER_ID's (like CUSTOMER_ID_INT and CUSTOMER_ID_EXT). These 2 will be internal and external Cust ID's. Use Java logic to show one of them.
Navneet. -
How to hide the Parameter field during Run time?
Hi,
How to hide the Parameter field during Run time?
I have a parameter field which behaves differently depending on the User logged in.
I am using reports 10G
For ex: I have 3 field created in JSP
CUSTOMER
PROVIDER
FROM DATE
END DATE
If the user = 'SUPER show all the parameter
CUSTOMER
PROVIDER
FROM DATE
END DATE
If the user is 'GATEKEEPER" Just show
PROVIDER
FROM DATE
END DATE
Can I do that?
Please help
Thanks.
KKhi, i'm not familiar much with JSP. but i think workaround is to create two window one which have 4 fields and the other which have 3. if user is SUPER then call the first screen otherwise if user is GATEKEEPER then call the second screen.
-
How to create a calculated field
Hi. I'd like to know how to create a calculated field for a master- detail form. For example: having two db fields price and quantity, i created a the total item (price * quantity) as pl/sql function like this:
begin
:p13_item_total := :p13_price * :p13_quantity;
end;
However, the item is not calculated. It is not and instant calculation. I mean if i modify either price or quantity, how to recalculate item total immediatelyYou must submit the page to do it with PL/SQL. If you do not want to submit the page, you must do it with JavaScript.
Thanks,
Tyler -
How to hide custom metadata field in custom profies ??
hi,
how to hide custom metadata dropdown list in a custom profile based on choosing the security group.
ex: if i choose xxx security group, custom metadata dropdown should not appeared, for remaining security groups it should be visible.
so, Based on criteria, custom metadata should be hidden in custom profiles..
how to achieve it ?? where and how to configure ??
Detail guidance should be required
Thanks in advanceYou cannot do this through profiles alone if I understand you correctly.
If I load a check in page, choose a security group and at this moment want a custom metadata field to disappear then you are beyond what profiles offers.
Rules evaluation can only be based on information that is know at the time the page is requested. That means in order for this to work you would need to make security group an non editable field and have a set of profiles for each security group.
The alternative is to customize the UI with soem DHTML or AJAX
Tim -
How to override a calculated field in acrobat pro xi
I have fields that will normally be calculated. However, it may be possible to offer discounts and the rep may want to enter a flat fee. How do I make a field be either calculated or user entered? Older versions seem to have that capability.
You also have to be careful with fonts. The font you download may be the same name, but a different font. Just because you find a Zurich BT font, does not mean it is the same. If you search on the internet, there are several sources of some Zurich BT fonts free. However, they may or may not be the same font. Editing is best done on the original document and not the PDF. One of the PDFs I found on the Landis site was only in Zurich font. I would think that the original file is available from the company and that should be the document you edit, not the PDF. It appears the original was created in InDesign (CS3).
-
How to keep a calculation field blank until the user enters a number?
I am building a sales sheet for a school that sells scrip as a fund-raiser. I have the document set so that when the user enters the number of scrip certificates he wants (say, two $25 gift certificates at Lowe's), the program will automatically calculate that this user owes $50 for that scrip category. However, there are more than 100 companies that one can choose from, and if the user doesn't enter a number, the calculated field shows $0. Is there a way that each field can stay blank until the user enters a number bigger than zero? By the way, I'm using this calculation to determine the value (borrowed from a user on this forum): event.value = 50 * this.getField("Lowes").value
Thanks!There are two approaches. You can either add the following Validate script:
// Custom Validate script for calculated field
if (+event.value !== 0) event.value = "";
Or you can change your custom Calculate script and set the Format type of the field to "None":
// Custom Calculate script
(function () {
var v = +getField("Lowes").value;
event.value = (v !== 0) ? util.printf("$%.2f", v) : ""; -
How to hide dynamic selection fields in variants
hi,
When a selection variant is saved, we have the option to 'hide' a selection field. That field may contain a value, but it is not shown on the selection screen. There is, however, a button that will display these hidden field when required.
Is it possible to do this also with dynamic selection fields ?
The column 'Hide field' is shown in the variant atttributes screen, but it is not active.
Please suggest
MSExplore SHD0 T code
-
How to add a calculated field in a list definition (schema.xml)?
Hello,
I'm currently trying to add a calculated field to a list definition (schema.xml).
I have put the following code at the end of the schema.xml for the list I want to create. But when I deploy and activate the feature for the list, it doesn't appear in the list field.
<Field ID="{EE20EC4B-4216-4259-A84F-C478CE42B70F}" Name="EC_EventsMgmt_CalculatedTime" StaticName="EC_EventsMgmt_CalculatedTime" Group="EC_EventsMgmt" Type="Calculated" DisplayName="Calculated Time" Required="TRUE" Hidden="FALSE" ReadOnly="FALSE" Format="DateTime"> <Formula>=DATE(2009,1,1)+TIME(EC_EventsMgmt_ScheduleHour,EC_EventsMgmt_ScheduleMinute,0)</Formula> <FieldRefs> <FieldRef Name="EC_EventsMgmt_ScheduleHour"/> <FieldRef Name="EC_EventsMgmt_ScheduleMinute"/> </FieldRefs> </Field>
Could you please give me some help and explain me why it is not working?
Thanks a lot.Hi there.
If I understand correctly, you create this list within the same feature?
If so, the list isn't available during the propagation, and therefore the calculated field can't be added.
If this is the case, then you could work around this by adding a feature activated event handler to your feature and add the calculated field programmatically in that event.
Hope this helps.
Regards,
Magnus
My blog: InsomniacGeek.com -
Form Guide: How to hide all the field of a subform
Hello,
I'm an experienced LC Designer user for PDF Forms. I need to work on my first Form guide today.
The first thing I cannot realize is to hide all the fields in a subform, based on some conditions. Is it possible to make that in a sort of script that work fine for both the pdf and the form guide?
I have noticed that subform doen't exists into form guide. What append with theire event scripts?
Thanks
DenisDECLARE
LC$Block Varchar2(40) := get_form_property( NAME_IN('System.Current_Form'), FIRST_BLOCK ) ;
BEGIN
Loop -- For each block of the form
Set_Block_Property( LC$Block, INSERT_ALLOWED, PROPERTY_FALSE );
Set_Block_Property( LC$Block, UPDATE_ALLOWED, PROPERTY_FALSE );
Set_Block_Property( LC$Block, DELETE_ALLOWED, PROPERTY_FALSE );
LC$Block := get_block_property( LC$Block, NEXTBLOCK ) ; -- next block
Exit when LC$Block is null ;
End loop ;
END;Francois -
How to hide a mandatory field in sap standard webdynpro via Enhancement
Hi,
I know to hide a column or UI via enhancement. But if we hide a field via this approach which requires an input we will still get an error message to make an entry.
I am trying to make changes in travel management e.g in FITE_VC_REVIEW webdynpro component. In REVIEW_VIEW in Flight Info table I want to hide columns like arrival time, arrival date. However in current scenario these fields are required to be filled in. If left blank we get an error message while saving or sending request.
Kindly guide me where and how to make changes to remove these column fields.
Regards,
MadhvikaYou can remove the UI elements from teh design itself by right clicking on it and slecting remove element.
but still the condition for checking the mandatory field swill be there in the code so for that you need
to write teh code to set some values to those attribute for passing the condition for validation
thanks
sarbjeet singh -
How to HIDE one data field in BEx???
Hi all,
I tried to HIDE one CHAR's value from report but no matter what I did. It still shows in the report. Need advice, please.
<b>EX: In the FILTER, I drag & drop 'product ID' to filter section and assign certain' value' under it and then run the query. It shows 'product ID with those values I assigned in the report.</b> I need to remove them from the report. How? (I already personized my variant so it won't show in the selection screen)
Thank you
J.Hi all,
Thank you for all informaiton. Here is an example for my scenario: I need to put Product ID in the FILTER section and 'restrict' the value- #112, #113 (ie: my sales report will be only for these two products). <b>This report is for products-#112,#113 only so my client doesn't want to see one row show: Product ID: #112, #113 in the report.</b> Any advice that I can avoid this row? I used 'no display' but it is still there.
J. -
How to hide a output field without changing its layout
Hi
My requirement is that i ahve a field which is just for calculation purpose and I do not want it to show as output.
I want to know how to do that without changing layout.Hi,
If your are using module pool. Goto the field attribute, in attribute select Display-> select Invisible check box.
Regards,
Bhaskar -
How to hide empty data fields (php users only)
how do you suppress the display of a given field if it has no value in a database (see code below)? You can take a look of the printscreen also.
Thanks
<td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail1']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
<?php echo $row_DetailRS2['code1']; ?></span></td>
<td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail2']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
<?php echo $row_DetailRS2['code2']; ?></span></td>
<td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail3']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
<?php echo $row_DetailRS2['code3']; ?></span></td>
<td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail4']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
<?php echo $row_DetailRS2['code4']; ?></span></td>
<td align="center" valign="middle"><span class="STYLECENTER"><img src="<?php echo $row_DetailRS2['thumbnail5']; ?>" alt="" name="" border="1" /></span><span class="STYLECENTER"><br />
<?php echo $row_DetailRS2['code5']; ?></span></td>// run the query; if it fails, print out the error message and terminate the script
$result = mysql_query($QrySQL) or die('Query failed: ' . mysql_error());
//if there isn't a row to fetch, then mysql_fetch_assoc() will return FALSE.
if ($row = mysql_fetch_assoc($result)) {
//$row now contains an associative array of the field names to their values in the first row
$firstSeen = $row['FirstSeen'];
You could loop through the result set by replacing that if with a while. If you wanted to find out how many rows were returned, you could use mysql_num_rows(). -
How to hide RTPs and Specify Fix value for them
Hi All,
I created a business in which i am using one variable of String type with RTP enabled.
Now i don't want my user to enter this value while executing business rule, instead i want to provide a fix/constant value for that variable. How can i do that.
Basically my intention is to put that business rule inside a rule twice with 2 diff valuesHave you tried setting the variable as a member type, applying it against a dimension and then giving it a default value.
Cheers
John
http://john-goodwin.blogspot.com/
Maybe you are looking for
-
How do you connect MacBook Pro 13 inch early 2011 to TV?
How can one connect a MacBook Pro 13inch early 2011 to a TV? What types of cables are needed? Possibility of wireless connection? Thanks.
-
"Logout' link is gone from IE8? Workspace 11.1.2.1
All of a sudden my 'Logout' link in workspace is gone. Any ideas? I suspect somehow my IE settings need tweaked?
-
.mov files won't run in Yosemite
For some reason my .mov files which played fine on my old iMac running 10.6.8 will not run on my new iMac 5k running 10.10.1. What do I need to do to get these files to run on my new mac?
-
I have lost my contact and photos after downlaod new ios
i have lost my contact and photo on my iphon 4 after daownload new ios how i c an return back thanks
-
Procedure entry point CreateSEmaphoreA could not be located...
When I try to open Photoshop, I get the following message which frightens me: "Procedure entry point CreateSEmaphoreA could not be located in the link library Kernel32.dll" I have no idea what this means but it sounds very scary to me. Photoshop, f