Cannot toggle field between visible & invisible

There is a defect with Designer's scripting that prevents toggling a numberic calculated field between being visible and invisible. Here is a sample calculated field script that reproduces the problem:
if (fieldOne.rawValue > 0)
this.rawValue = fieldOne.rawValue * fieldTwo.rawValue;
this.presence = "visible";
else
this.presence = "invisible";
this.rawValue = 0;
Note that the same defect is present when using an equivilent FormCalc script.

I tried your script on a form in Designer 7.1 which I previewed as an Acrobat 7.0.5 Dynamic PDF. While I didn't have problems with the script toggling the presence of the field, the product field's value would always remain zero (0).
Then I modified the script to be as follows (in JavaScript):
if (fieldOne.rawValue > 0)
  if (this.presence != "visible")
    this.presence = "visible";
  this.rawValue = fieldOne.rawValue * fieldTwo.rawValue;
else
  if (this.presence != "invisible")
    this.presence = "invisible";
  this.rawValue = 0;
Using this script, everything worked fine: Both the toggling of the presence of the product field as well as its calculated number.
This made me wonder if there was a timing issue when setting a field's presence immediately after changing its value so I tried a configuration where I had two numeric fields: One field receives a number entered by the user while the other has a Calculate script on it which hides itself if the first field's value is zero or less and shows itself along with the value of the field field multiplied by 10.
This is the JavaScript I used on the "10 product" field:
if (NumericField4.rawValue > 0)
this.presence = "visible";
this.rawValue = 10 * NumericField4.rawValue;
else
this.presence = "invisible";
this.rawValue = 0;
Once again, this worked as expected. But when I changed the order of the operations such that the presence was being changed
after the value, while the presence was being set correctly, the value always remained zero (0).
So I believe this proves that there's a bug with setting the presence after setting the value in a Calculate script where the value always remains zero (0) and this also shows that there's a simple work-around. If you're still having problems with the presence while using the suggested work-around, it's possible you're either using a version of Acrobat which is prior to 7.0.7 and has worst symptoms than this latest version or that you're either previewing or you've saved your form in a
static PDF format.
Thank you for pointing-out this problem. I'll report it to Acrobat. Bare in mind, however, that the Calculate event was never meant for anything more than affecting a field's value based on a calculation. Of course, I, personally, understand (and see the value in) the desire to affect much more than a field's value in the Calculate event since it runs every time the value of a field on the form changes. But since it wasn't designed for that, one should always be careful when writing complex calculation scripts such as the one you were using.
Attached is my test form for you to try.
Stefan
Adobe Systems

Similar Messages

  • Dynamically set data field as visible/invisible....

    Hi,
    Assume that i have a table like the following:
    id varchar2(10),
    val0 number(10,2),
    val1 number(10,2),
    val2 number(10,2)
    where the id is the primary key and the other three columns are the values of each year (the current , current+1 , current+2 respectively).
    I consider to use a parameter - in parameter form , where the user would select one year and afterwards the report would display only the appropriate value field - that is , the column val0 (for the current).. e.t.c.....
    Is the above achievable....????
    Note : I use Dev2000 v.6i
    Thanks, a lot
    Sim

    Hi,
    you can use a single field referencing for example val0. Then write a format trigger for this field with something like:
    if :my_param = 'year + 1' then
    srw.set_field(0,:val1);
    elsif :my_param = 'year + 2' then ....
    As other possibility use for every column a field a write a format trigger to every field depending your parameter.
    regards
    Rainer

  • Access - Another Newbie Visible/Invisible Field Q

    With help from Maurice, I now have two fields and associated labels that become visible/invisible dependent on the selection/status of a checkbox.  The visibility is controlled in the AfterUpdate property of the check box.  See previous "field
    visibility" post.
    What I am now looking to do is have the visibility of those fields change as I navigate between records.  So if the checkbox is unchecked for a particular record, then the fields are not visible when this record is displayed in my form.
    Can someone tell me in which event this test should be applied?
    I'm thinking this should be a form event, but I don't see a change record event as such.
    Thanks
    Phil

    Hi Phil,
    You can accomplish this by using the 'on current' event of the form. That way when you navigate to another record you can trigger an event. Be aware though that this is a costly event because it will fire every time you go to another record.
    You can use the value of the checkbox as your trigger. Something like if me.checkbox=0 then me.label.visible=true or false.
    Let us know if that helps
    Maurice
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer. Thank You
    The Office Corner

  • I cannot toggle between front and rear cameras on my iPad 4; any ideas?

    I cannot toggle between front and rear cameras on my iPad 4; Any ideas?

    Make sure IOS is updated to latest version
    Reboot device by pressing both the home button and sleep/wake (power) buttons at the same time for 10-15 seconds until the apple logo appears on the screen, then let go.
    If that doesn't work then reset the device by going to settings/general/reset/reset all settings

  • Visible/invisible subform based on choices from 2 dropdowns

    Does anyone have an example of a form with subforms being visible/invisible based on the answers of 2 dropdowns.
    thanks for sharing

    Hi Jagan,
    It is probablly just how you set up the script.
    For starters, for Yes/No choices I think you would be better to use radio buttons instead of checkbox objects. So for example you would have four different radio button exclusion groups, each with a Yes and No radio button. Then in the Object > Binding palette, you would set the Yes value to 1 and the No value to 0.
    This way you can sum the four radio button exclusion groups and if the total value is >=1 then change the presence of the text field and highlighting to suit.
    There are some examples here that might help:
    Scoring options: http://assure.ly/uiKS6f.
    Tracking interaction (checkboxes): http://assure.ly/xDbtbx.
    Hope that helps,
    Niall

  • Existing field in field group, but invisible pcui.

    Hi,
    I have to add field(make visible) to Accounts which is invisible to the existing field group.I have to make it visible.
    This is in field group ACC_GENERAL_DATA.This filed is referencegroup for ACC_SRES_ADDRESS_V1, ACC_GENERAL_DATA, as a reference.I check the check box visible field in field properties.
    I regenerated ACC_GENERAL_DATA.It says field group is correct.
    should i regenerate the reference group too?.
    If i did it says no field group is found.
    please can you tell me how to make field visible in pcui.
    when i check in result iam not able to see it.Why?
    Regards,
    swathi

    Date range is not in a parameter.  It is used in the following SELECT statement for the dataset:
    SELECT SUPPLIER_CODE,SERIAL_NO,TRACKING_NO,MILL_COIL_NO,MILL_ORDER_NO,FROM_SERIAL_NO,FROM_TRACKING_NO,MA_CL_DATE,MASTER_ID,MA_TRACKING_NO,MA_MILL_COIL_NO,ORG_COIL_WT_KGS,CREATE_DATE,ACTIVE,TRACE_FLAG,MATERIAL_CLASS,MATERIAL_STATUS,PART_NO,PART_NAME,PART_TYPE,PART_GROUP,PART_PRODUCT_TYPE_CODE,NET_WEIGHT,GROSS_WEIGHT,PIECES,WEIGHT_KGS,HEAD_SCRAP_KGS,TAIL_SCRAP_KGS,OFFAL_SCRAP_KGS,ENGINEERED_SCRAP_KGS,INHERITED_ENGINEERED_SCRAP_KGS,INHERITED_HEAD_TAIL_SCRAP_KGS,INHERITED_MILL_RSDC_SCRAP_KGS,MILL_SCRAP_KGS,RSDC_SCRAP_KGS,FREC_SCRAP_KGS,SCRAP_KGS FROM VIEW_PLEX_TRACEABILITY_REPORT WHERE (MA_CL_DATE >= TO_DATE('09/02/2014', 'MM/DD/RR' ) AND MA_CL_DATE <= TO_DATE('09/03/2014', 'MM/DD/RR' )) AND SUPPLIER_CODE = 'NOVELI' ORDER BY SUPPLIER_CODE ASC,MASTER_ID ASC,CREATE_DATE ASC,FROM_SERIAL_NO ASC,SERIAL_NO ASC
    No formula used in the Group Field for MA_CL_DATE.
    I know the SELECT statement is getting the correct data.

  • Relationship cannot be created between identical business partners

    Hello,
    I am implementing CRM 5.0 and trying to create business partner relationships to the identical business partner.  For example, I am trying to makbe BP#1 have te relationship 'Has a Contact of' to BP#1.  However, I am getting the error message:
    'Relationship cannot be created between identical business partners'.
    (Message no. R1776)
    Has anyone ever encountered this error?  Is there any way to create a relationship in SAP-CRM to the same business partner?
    Thanks much for your help,
    Dan

    Hi Daniel
    In short: No, it is not possible to have a relationship "between" a BP and itself.
    In long: In R/3 there are partner roles like Sold to, ship to and others. When CRM was designed the people at SAP did want to simplify a bit and implemented the following logic for partner determination: If there is no relationship of a searched type, the BP itself is taken. As a result a relationship pointing to its source is not allowed as it would duplicate the information already existing.
    Hope this helps,
    Kai

  • How can I share a static field between 2 class loaders?

    Hi,
    I've been googling for 2 days and it now seems I'm not understanding something because nobody seems to have my problem. Please, somebody tell me if I'm crazy.
    The system's architecture:
    I've got a web application running in a SunOne server. The app uses Struts for the MVC part and Spring to deal with business services and DAOs.
    Beside the web app, beyond the application context, but in the same physical server, there are some processes, kind of batch processes that update tables and that kind of stuff, that run once a day. Theese processes are plain Java classes, with a main method, that are executed from ".sh" scripts with the "java" command.
    What do I need to do?
    "Simple". I need one of those Java processes to use one of the web app's service. This service has some DAOs injected by Spring. And the service itself is a bean defined in the Spring configuration file.
    The solution is made-up of 2 parts:
    1. I created a class, in the web app, with a static method that returns any bean defined in the Spring configuration file, or in other words, any bean in the application context. In my case, this method returns the service I need.
    public class SpringApplicationContext implements ApplicationContextAware {
         private static ApplicationContext appContext;
         public void setApplicationContext(ApplicationContext context) throws BeansException {
              appContext = context;
         public static Object getBean(String nombreBean) {
              return appContext.getBean(nombreBean);
    }The ApplicationContext is injected to the class by Spring through the setApplicationContext method. This is set in the Spring configuration file.
    Well, this works fine if I call the getBean method from any class in the web app. But that's not what I need. I need to get a bean from outside the web app. From the "Java batch process".
    2. Why doesn't it work from outside the web app? Because when I call getBean from the process outside the web app, a different class loader is executed to load the SpringApplicationContext class. Thus, the static field appContext is null. Am I right?
    So, the question I need you to please answer me, the question I didn't find in Google:
    How can I share the static field between the 2 class loaders?
    If I can't, how can I load the SpringApplicationContext class, from the "Java batch process", with the same class loader my web app was started?
    Or, do I need to load the SpringApplicationContext class again? Can't I use, from the process, the class already loaded by my web app?
    I' sorry about my so extensive post...
    Thank you very much!

    zibilico wrote:
    But maybe, if the web service stuff gets to complicated or it doesn't fulfill my needs, I'll set up a separate Spring context, that gets loaded everytime I run the "Java batch process". It'll have it's own Spring configuration files (these will be a fragment of the web app's config files), where I'll define only the beans I need to use, say the service and the 2 DAOs, and also the DB connection. Additionally, I'll set the classpath to use the beans classes of the web app. Thus, if the service and DAOs were modified in the app server, the process would load the modified classes in the following execution.You'll almost certainly have to do that even if you do use RMI, Web services etc. to connect.
    What I suggest is that you split your web project into two source trees, the stuff that relates strictly to the web front end and the code which will be shared with the batch. The latter can then be treated as a library used by both the batch and web projects. That can include splitting Spring configuration files into common and specific, the common beans file can be retrieved from the classpath with an include. I regularly split web projects this way anyway, it helps impose decoupling between View/Controller and Model layers.
    On the other hand, you might consider running these batch processes inside the web server on background threads.

  • Cannot transliterate character between character sets problem

    i hava a database which carset is selected none before
    when i want to get data from this database i get the error
    java.sql.SQLException: [interclient][interbase]arithmetic exception, numeric overflow, or string truncation
    [interclient][interbase]Cannot transliterate character between character sets
         at interbase.interclient.ResultSet.remote_FETCH_ROWS(Unknown Source)
         at interbase.interclient.ResultSet.getNextCursorPosition(Unknown Source)
         at interbase.interclient.ResultSet.next(Unknown Source)
    but i m getting the error when rs.next()
    so ican't use methods to encode when rs.getBytes.............

    i hava a database which carset is selected none
    before
    when i want to get data from this database i get the
    error
    java.sql.SQLException:
    [interclient][interbase]arithmetic exception, numeric
    overflow, or string truncation
    [interclient][interbase]Cannot transliterate
    character between character sets
    atcontact the driver vendor for support.

  • Sharepoint 2010 - Cannot make field Required in Add New Item form.

    I made a fleld Required by making the proper selection in List Settings > Editing the column.  It now shows as required when I edit an existing record in the list, but is not required when adding a new item.  Why does the setting not apply
    to the Add New Item form?  How can I make it apply/required?
    btw, there are no content types associated with the list.

    Hi  ,
    According to your description, my understanding is that you cannot make field required in the list new form.
    For my test, I created a custom list , added a non-required field and added some records. Then I made the field required. But it worked fine as expected both in existing records and  in Add New Item
    form.
    Do you have some customization in your list new form?
    You can go to your list -> Customize Form under  list tab, then the new form will be opened in the InfoPath. In the InfoPath, right click the field and select Text Box Properties, make sure “Cannot
    be blank”  has been checked.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Select a number of fields between one field and another

    Hello,
    Is there any way to make a SELECT to show a number of fields between one field and another,
    without writting all the fields one by one ?
    For example, I have one table with these fields:
    TABLE EMPLOYEE:
    ID_EMPLOYEE NAME PHONE CAR AGE MARRIED
    and I just want to make a SELECT who shows only fields from NAME to AGE, but i don't want to
    write in the SELECT all the fields one by one.
    Is this possible?
    Thank you very much.
    Sorry for my english it's not very good.

    Swam wrote:
    Hello,
    Is there any way to make a SELECT to show a number of fields between one field and another,
    without writting all the fields one by one ?
    For example, I have one table with these fields:
    TABLE EMPLOYEE:
    ID_EMPLOYEE NAME PHONE CAR AGE MARRIED
    and I just want to make a SELECT who shows only fields from NAME to AGE, but i don't want to
    write in the SELECT all the fields one by one.
    Is this possible?
    Thank you very much.
    Sorry for my english it's not very good.If you use the DBMS_SQL package to execute your query you can reference the columns by position rather than name.
    One examples of using DBMS_SQL package:
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2    cur       PLS_INTEGER := DBMS_SQL.OPEN_CURSOR;
      3    cols      DBMS_SQL.DESC_TAB;
      4    ncols     PLS_INTEGER;
      5    v_min_col NUMBER := 2;
      6    v_max_col NUMBER := 4;
      7    v_val     VARCHAR2(4000);
      8    v_bindval VARCHAR2(4000);
      9    v_ret     NUMBER;
    10    d         NUMBER;
    11  BEGIN
    12    -- Parse the query.
    13    DBMS_SQL.PARSE(cur, 'SELECT * FROM emp', DBMS_SQL.NATIVE);
    14    -- Retrieve column information
    15    DBMS_SQL.DESCRIBE_COLUMNS (cur, ncols, cols);
    16    -- Display each of the column names and bind variables too
    17    FOR colind IN v_min_col..v_max_col
    18    LOOP
    19      DBMS_OUTPUT.PUT_LINE ('Column:'||colind||' : '||cols(colind).col_name);
    20      DBMS_SQL.DEFINE_COLUMN(cur,colind,v_bindval,4000);
    21    END LOOP;
    22    -- Display data for those columns
    23    d := DBMS_SQL.EXECUTE(cur);
    24    LOOP
    25      v_ret := DBMS_SQL.FETCH_ROWS(cur);
    26      v_val := NULL;
    27      EXIT WHEN v_ret = 0;
    28      FOR colind in v_min_col..v_max_col
    29      LOOP
    30        DBMS_SQL.COLUMN_VALUE(cur,colind,v_bindval);
    31        v_val := LTRIM(v_val||','||v_bindval,',');
    32      END LOOP;
    33      DBMS_OUTPUT.PUT_LINE(v_val);
    34    END LOOP;
    35    DBMS_SQL.CLOSE_CURSOR (cur);
    36* END;
    SQL> /
    Column:2 : ENAME
    Column:3 : JOB
    Column:4 : MGR
    SMITH,CLERK,7902
    ALLEN,SALESMAN,7698
    WARD,SALESMAN,7698
    JONES,MANAGER,7839
    MARTIN,SALESMAN,7698
    BLAKE,MANAGER,7839
    CLARK,MANAGER,7839
    SCOTT,ANALYST,7566
    KING,PRESIDENT,
    TURNER,SALESMAN,7698
    ADAMS,CLERK,7788
    JAMES,CLERK,7698
    FORD,ANALYST,7566
    MILLER,CLERK,7782
    PL/SQL procedure successfully completed.
    SQL>Of course, if you were going to do this properly you would bind the correct datatypes of variables based on the types of the columns (the type information is also available through the describe information)

  • Cannot insert field or paste in existing Local Variable (container of booleans)

    Cannot insert field or paste in existing Local Variable (container of booleans)...  TestStand 4.1.
    This is very strange, especially since I have done it before. 
    The "paste" and "insert field" selections are greyed out and disabled from the right-click menu.  I have tried everything I could imagine, and searched various combinations of posts.  I am sure it is something redicoulously simple, bu I cannot find the redicule to solve this annoying issue.
    The local variable is a container of booleans.  It has 90 elements and I need to add one more.  I cannot edit / rename or do anything with this Local.  Must be karma (for thos who know me in the LabVIEW forum).  Usually, you right click, insert field and it's there..  Not this one..
    Has anyone seen this before?  Closing and re-opening TestStand did not change anything.  There is a matching cluster in LabVIEW which feeds the local in TestStand.
    It is a container of custm data type.  The Edit Flags are ok (edit is allowed).  Can't think of any other valuable info..
    Solved!
    Go to Solution.

    I should correct an erratum in my original post.. 
    Since I am not the original author of the code, I am not sure it is a custom container.  As a matter of fact, I don't think it is.
    It does not appear in the custom data types.  So it must be a Local.
    I will attempt to clarify what I am dealing with...  (TestStand 4.1)
    Maybe pictures are worth thousands of words.
    As with typical TestStand projects, there are various variables:  Locals, Parameters, FileGlobals, etc..  Nothing odd here.
    The one I am concerned about is the Options_Present which is a container of booleans.
    I am sure I have edited this one before.  Although I seem to recall that it was automatic after changing the cluster in LabVIEW.
    Within the Locals, the  2 that are underligned in red do not allow to edit anything (change name, add, delete, paste).
    Trying to Insert Field or paste are not possible.
    Attachments:
    Variables.PNG ‏8 KB
    Locals.PNG ‏28 KB
    cannotInsert.PNG ‏9 KB

  • Forms - Can't set a required field to visible=false

    Hi,
    I want to set a required field to visible=false but OIM 9.1 gives an error saying it is not possible.
    Has anyone overcome this issue?
    Thanks in advance

    I guess, it should work; instead of html:submit, try with button.

  • Error AP-CANNOT READ FIELD (FIELDNAME=PARAMETER.CONFIG)

    Hi,
    We are running a depriciation report in our test instance which is on 12.0.6 Oracle Apps
    While report executes we get this error:Error AP-CANNOT READ FIELD (FIELDNAME=PARAMETER.CONFIG)
    Can u please highlight where the error lies.

    Hi;
    Please see:
    Error AP-CANNOT READ FIELD (FIELDNAME=PARAMETER.CONFIG) When Viewing the Concurrent Request Output [ID 466410.1]
    Regard
    Helios

  • Make region/Task-Flow visible/invisible inside the page created in composer mode.

    Environent_
    JDeveloper 11.1.1.6.0
    Webcenter Sites version : 11g R1.
    Problem statement_
    Below example is to demonstrate the usecase to make region visible/invisible inside the page created in composer mode.
    The problem with this case is the 'Show Component' property does not automatically evaluate its expression even after using the contextual event.
    We want the region to be refreshed at run-time just like it works with design time pages using Refresh, RefreshCondition attributes in pageDef.
    My Usecase_
    I have two task flows dragged in Webcenter Customized Page.
    First contains Employee list and Second  contains selected employee's manager name.
    By default when page loads second task-flow/Dragged-Box  should be hidden.
    When I select employee from first box, then immediately second box should be appeared with manager name.
    In the case when If Employee does not have manager, second box should be disappeared. Whole page should not be refreshed only the second box should be refreshed and hide.
    Regards,
    Niraj

    Hi Jiri,
    Thanks for your prompt reply..
    While referencing the taskflow in any page will create a region and makes entry in pageDef for that page.
    In the PageDef of that page I am using Refresh and RefreshCondition attributes of the taskflow tag in order to refresh the taskflow based on certain condition or parameter change.
    I want to achieve the same in run-time environment using composer mode. where I have the control over page but do not have pageDef (visually where I can go and add the attributes Refresh and RefreshCondition manually)
    I would be obliged if someone can help on this.
    Thanks
    Regards,
    Niraj

Maybe you are looking for

  • How i create an audio streaming in adobe muse?

    I am creating an online radio station. As I can create streaming audio with adobe muse?

  • I tunes is skipping

    I read several posts about this, but nothing seems to be helping the issue. My i tunes is skipping on every song. Is there a way to fix this problem?

  • Imessage error agein

    i went to setting and went to message i clicked login with apple id then i enter the info after a few it crashes. PLZ HELP

  • Creation of process chain folder

    Hi, Please let me know how to create process chain folder. Example: i want create folder called SALES in RSPC, so i can put all sales related process chains in Sales folder. Thanks in Advance Satya

  • Cartesian queries

    Can someone explain me, why result of this query: select * from  sys.v_$sql where hash_value in       (select hash_value from sys.v_$sql_plan        where options = 'CARTESIAN' and operation LIKE '%JOIN%' ) order by hash_value; is that statement: sel