Problems with the script to output event

In fact I don't know if I have a problem with the Exit event or if there is something wrong with my script syntax... The output of a field event, I check if the field is empty or not and check a flag I put in place.

The first if statement works - if I get back a value in the field, everything goes as planned. If I delete the value of the field, nothing happens.

//if field has a value hide subSection04
if (!(this.rawValue == null || this.rawValue.length == 0))
{
     subSections.subSection04.presence = "hidden";
}

//if field is empty and flag equals true show subSection04
else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == true))
{
     subSections.subSection04.presence = "visible";
}

//if field is empty and flag equals false hide subSection04
else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == false))
{
     subSections.subSection04.presence = "hidden";
}
There are a few groups radio button that also control this behavior, they are all inter relate. So I tried also triggers the Click event of a radiobutton Group (which resembles the value in this field) out of this area, but that doesn't seem to work.

Hi Jono,

Your expression subFlags.Commercial.rawValue is true compares a String data type with a Boolean data type.

Edit the expression as subFlags.Commercial.rawValue is 'true'

I hope that this should work for you.

Your code should look like

//if field has a value hide subSection04
if (!(this.rawValue == null || this.rawValue.length == 0))
{
     subSections.subSection04.presence = "hidden";
}

//if field is empty and flag equals true show subSection04
else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "true"))
{
     subSections.subSection04.presence = "visible";
}

//if field is empty and flag equals false hide subSection04
else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "false"))
{
     subSections.subSection04.presence = "hidden";
}

Nith

Tags: Adobe LiveCycle

Similar Questions

  • lately and I don't know why I see a pop up of a problem with the script. can some1 help me?

    There is a pop up of a problem with the script. He asked end and contuniue the script. I didn't have this problem before. Please help me this is getting really annoying. He asks a lot

    I changed a theme and almost never have a problem again...

  • Having a problem with the script error message

    The error message and web page script error every move I make now. I tried to check and uncheck boxes tab in advance internet options. I also ran a check of the system that did not help either. Any suggestions? Thank you

    Hi Mic,

    From the description, it seems that you have a problem with the script error message in Internet Explorer.

    To better understand the question, please answer the following questions:

    1. is specific to a particular Web site question?

    2 have you made changes on the computer before this problem?

    3. What is the exact full error message and web page of script error message?

    4. When you get exactly the script error message and web page error message appears?

    5. what exactly you're talking about when you say "system check"?

    See the article mentioned:

    How to troubleshoot script errors in Internet Explorer

    http://support.Microsoft.com/kb/308260

    Hope the above information is helpful. If you have any question back to us, we are happy to help you.

  • problems with the script in indesign

    Hi all

    I'm new and scripts so I hope I can explain what I need

    Well, I have an indesign file in which I need to insert an extra layer with the translation of a language, have a layer IN English and an extra a FR for the french.

    I found a script that's like that

    with (app.clipboardPreferences) {}

    pasteRemembersLayers = true;

    }

    var docTarget = app.documents.itemByName ('French.indd');

    var docSource = app.documents.itemByName ('French.indd');

    If (docSource.isValid & & docTarget.isValid) {}

    var numSpreads = docSource.spreads.length;

    for (var i = 0; i < numSpreads; i ++) {}

    app.activeDocument = docSource;

    app.activeWindow.activeSpread = app.activeDocument.spreads [i];

    App.Select (App.activeDocument.spreads [i] .allPageItems);

    If (app.selection.length > 0) {}

    app. Copy ();

    app.activeDocument = docTarget;

    If (app.activeDocument.spreads [i] .isValid) {}

    app.activeWindow.activeSpread = app.activeDocument.spreads [i];

    app.pasteInPlace ();

    }

    }

    }

    }

    but it seems to cause problems with the files,

    I have to say that the source is a file very heavy, even enter takes a long time.

    but I want to just get into the text layer,

    Do you think this script works finally, can you spot an error or something?

    Hello

    Your script is copying content of any doc (allPageItems) in an another doc - all number two need to have equal variances.

    You don't need to run the script if your goal is to create the new layer in the existing doc.

    The questions are

    What elements of the page must be copied into this layer

    AND

    should bound texts copied frames play any content

    AND

    wherever the content come from?

    Jarek

  • Problems with the digital input/output

    Hello

    I have a little problem with my card PCI-6143. I would use two connectors digital one as a starter and one as an output. Now, I have the problem that I do not know how I address them. The input works as I want but not the output.

    As an example. I call my channel output on this name: Dev1/port0 / line0:0.
    With this call, the application works very well. If I change the output channel to Dev1/port0 / line4:0 I get an error that the values can be read and 0 and 1 are valid values.
    I hope that the call is right, I wrote that out of my head.

    My questions are. Is it correct to call a single digital channel with this name?
    I'm not sure because I do not understand what these means 'line' and if I allocate really single channel or more.
    The second question is, can someone give me an example of how I assign two digital channels (how to address them)?
    I know it's maybe an easy question, but I can't seem to get it corrected.

    Hope someone can help me.

    Best regards

    The syntax that you use is intended to select several channels: the numbers are the initial and final channel in a subsequent channel list. Thus, written Dev1\port0\line0:4 means 5 lines are included in the read/write (FWIW written 4:0 has the same effect). It is redundant but good writing line0:0, which means a single line, but you can write to Dev1\port0\line0 which is simpler.

    This is a help page on this topic.

  • Problems with the script tracks

    Hi all!

    I should start by saying that I have very little knowledge of scripting languages. I found a script of the interwebs that is designed to process images in batch photomerge. I was able to run the script that references a second script in the Adobe stock pile Scripts only on file (Photomerge.jsx). The error occurs on line 44 when he says that the file or folder does not exist. Here is the code:

    41 g_StackScriptFolderPath = app.path var + ' / ' + localize("$$$/ScriptingSupport/InstalledScripts=Presets/Scripts") + ' / '.

    42 + locate ("$$$ / private/Exposuremerge/StackScriptOnly = stack Scripts only /");

    43

    44 .evalFile $(g_StackScriptFolderPath + "LatteUI.jsx");

    45

    46 .evalFile $(g_StackScriptFolderPath + "StackSupport.jsx");

    47

    48 .evalFile $(g_StackScriptFolderPath + "CreateImageStack.jsx");

    49

    $50 .evalFile (g_StackScriptFolderPath + "Geometry.jsx");

    51

    $52 .evalFile (g_StackScriptFolderPath + "PolyClip.jsx");

    So, I feel that I should need to modify the scripts of stock and if I do, it will open a whole Pandora's box. My question is, what am I doing wrong?

    This is the blog where I found the photomerge batch code: Automating automate: Photomerge in Adobe Photoshop batch running | Cristi Cotovan

    Thanks for any idea!

    ANI

    You, but you need a quotation for the path. You only have to the end. You can still use app.path:

    newPath = app.path var + ' / presets/Scripts/battery settings, Scripts Only / LatteUI.jsx'

    You may encounter another subject-the .evalFile $ with these, but it's how you manage paths.

  • Problem with the report and the system of axis 2d

    Hi, I'm trying to write a script with tiara, who wrote a 2d axis system in the report but I'm having a lot of problems with it.

    What I'm trying to do, is make 3 or more system axis 2d in the report, each displaying a part of the data of 2 channels (x = ch0, ch1 = y).

    With only 1 graphic I get what I want, but when I try to add the 2nd or the 3rd, they show without my defined x-scale and with the offset x different from the first chart.

    I tried everything, but I could not remedy

    I added as attachments the .csv file that I use to ch0 and ch1 and 2 screen shoots "what I get" (about the problem with the script) and "what I hope to get" (done manually, is what I'm trying to get the report)

    Any help will be appreciated, thanks in advance

    Ierman

    I'll post my code here:

    Dim Xscale, Yscale
    XScale = Array (0,25,0,5,49)
    Yscale = Array(-0.2,0.2,-0.2,10,4)
     
    Call PicDelete()
    Call GraphObjNew ("2D-Axis", "2DAxis1")
    Call GRAPHObjOpen ("2DAxis1")
    D2AxisTop = 1

    D2AxisBottom = 70
    D2AxisLeft = 1
    D2AxisRight = 1
    Call GRAPHObjOpen ("2DYAxis1_1")
    D2AxisyScaleType = "manual".
    D2AXISYBEGIN = Yscale (0)
    D2AXISYEND = Yscale (1)
    D2AXISYORIGIN = Yscale (2)
    D2AXISYTICK = Yscale (3)
    D2AXISYMINITICK = Yscale (4)
    Call GRAPHObjClose ("2DYAxis1_1")
    Call GRAPHObjOpen ("2DXAxis1_1")
    D2AxisxScaleType = "manual".
    D2AXISXBEGIN = Xscale (0)
    D2AXISXEND = Xscale (1)
    D2AXISXORIGIN = Xscale (2)
    D2AXISXTICK = Xscale (3)
    D2AXISXMINITICK = Xscale (4)
    D2AxisXTxt = ""

    D2AxisXColor = 'black '.

    D2AxisXTickAuto = 1
    D2MTickLineWidth (1) = 0.1
    D2MTickLineType (1) = "solid".
    D2AxisXTickSize = 60
    D2AxisXTxtAutoCo = 0
    D2MTickColor = "red".
    Call GRAPHObjClose ("2DXAxis1_1")
    Call GraphObjNew("2D-Curve","New_Curve")

    Call GraphObjOpen ("New_Curve")

    D2CCHNX = "[1] / [1]" "

    D2CCHNY = "[1] / [2]" "

    D2CurveColor = "red".
    Call GraphObjClose ("New_Curve")
    Call GRAPHObjClose ("2DAxis1")

    Dim Xscale1, Yscale1
    Xscale1 = Array (25,50,0,5,49)
    Yscale1 = Array(-0.2,0.2,-0.2,10,4)
    Call GraphObjNew ("2D-Axis", "grafic")
    Call GRAPHObjOpen ("grafic")
    D2AxisTop = 40

    D2AxisBottom = 37
    D2AxisLeft = 1
    D2AxisRight = 1
    Call GRAPHObjOpen ("2DYAxis1_2")
    D2AxisyScaleType = "manual".
    D2AXISYBEGIN = Yscale1 (0)
    D2AXISYEND = Yscale1 (1)
    D2AXISYORIGIN = Yscale1 (2)
    D2AXISYTICK = Yscale1 (3)
    D2AXISYMINITICK = Yscale1 (4)
    D2AxisYTxt = "" ' testo asse label y
    Call GRAPHObjClose ("2DYAxis1_2")
    Call GRAPHObjOpen ("2DXAxis1_2")
    D2AxisxScaleType = "manual".
    D2AXISXBEGIN = Xscale1 (0)
    D2AXISXEND = Xscale1 (1)
    D2AXISXORIGIN = Xscale1 (2)
    D2AXISXTICK = Xscale1 (3)
    D2AXISXMINITICK = Xscale1 (4)
    D2AxisXTxt = «»

    D2AxisXColor = 'black '.

    D2AxisXTickAuto = 1
    D2MTickLineWidth (1) = 0.1
    D2MTickLineType (1) = "solid".
    D2AxisXTickSize = 60
    D2AxisXTxtAutoCo = 0
    D2MTickColor = "red".
    Call GRAPHObjClose ("2DXAxis1_2")
    Call GraphObjNew("2D-Curve","New_Curve1")

    Call GraphObjOpen ("New_Curve1")

    D2CCHNX = "[1] / [1]" "

    D2CCHNY = "[1] / [2]" "

    D2CurveColor = "red".
    Call GraphObjClose ("New_Curve1")
    Call GRAPHObjClose ("grafic")

    Hi lerman,.

    Here is an edited version of your code that works on my computer.  A problem that I know that I fixed it was that your presentation of the STATE was in the name-oriented mode but you use the variables based on the number to assign it X and Y channels.  The execution of these commands in a loop FOR makes it much easier to debug the code and to avoid any annoyance at first.

    Brad Turpin
    Tiara Product Support Engineer

    National Instruments

  • I have a problem with the content of spam. Somewhere in the Fox appeared script that's choking me audio spam. Every 30 minutes he's playing an audio clip that is malicious.

    Hello.
    I have a problem with the content of spam. Somewhere in the Fox appeared script that's choking me audio spam. Every 30 minutes he's playing an audio clip that is malicious. I can't find the settings as it eliminated. Now, I don't have any plug-ins and Add-ons strange that were not initially in the Fox, but the problem is there.
    I use the Fox years. The problem, he had 1.5 months after Fox cleaning. If the problem can't win, I'll be forced to give up the browser, and I wouldn't.

    Could test you mode without failure of Firefox? It is a standard diagnostic tool to disable some advanced features of Firefox and extensions. More info: questions to troubleshoot Firefox in Safe Mode.

    Does not work if Firefox: Hold down the SHIFT key when you start Firefox.

    If Firefox is running: You can restart Firefox in Mode safe mode using either:

    • button "3-bar" menu > "?" button > restart with disabled modules
    • Help menu > restart with disabled modules

    and OK reboot.

    Two scenarios: A small dialog box should appear. Click on 'Start mode safe' (not update).

    Any improvement?

    If the problem persists in Mode without failure, could reinstall you Firefox in this way:

    Clean reinstall it

    We use this name, but it isn't about deleting your settings, this is to ensure that the program, files are clean (not incompatible, corrupt or exotic code files). As described below, this process does not disrupt your existing settings. Don't uninstall NOT Firefox, that does not need.

    (1) download a fresh Installer for Firefox 38.0.5 of https://www.mozilla.org/firefox/all/ in an ideal location. (Scroll down your preferred language).

    (2) close Firefox (if applicable).

    (3) to rename the program folder, either:

    (Windows 64-bit folder names)

    C:\Program Files (x86)\Mozilla Firefox
    

    TO

    C:\Program Files (x86)\OldFirefox
    

    (Windows 32-bit folder names)

    C:\Program Files\Mozilla Firefox
    

    TO

    C:\Program Files\OldFirefox
    

    (4) run the installer you downloaded in the #1. It should automatically connect to your existing settings.

    Any improvement?

    Note: Some plugins can only exist in this OldFirefox file. If it is missing something essential, present in these files:

    • \OldFirefox\Plugins
    • \OldFirefox\browser\plugins
  • Since 10.11 I have not been able to download via the usb port of my Davis Vantage weather station. No solution of tech Davis on the issue even with the new recorder of events in the resort. Is there a problem with the usb?

    Since 10.11 I have not been able to download via the usb port of my Davis Vantage weather station. No solution of tech Davis on the issue even with the new recorder of events in the resort. Is there a problem with the usb?

    What Mac? (details)

  • Problem with the change in value of listbox event

    Hello

    I have a problem with the help of Listbox value change event. The code that I have attached is a simplified version of the largest program, but the problem is the same. One of the loops of Nonna is responsible for handlig occurring events ant the other is responsible for the execution of the program. In the project of oryginal I use a listbox control to determine which plots graphic display of a waveform is visible (first position of the listbox-> only plot first visible etc.). In the attached vi, I just show the current value of the listbox control. The problem is the event runs only once and then the program crashes. I want to be able to change the value of the listbox work both at idle and in State of a program, but when I put the structure of the event in both States, he does not. I'd be very grateful if someone smarter than me could tell me where I made my mistake. I want my program to be able to manage the keys and listbox events in States (slow down and knit) program.

    You have two structures of event in two cases different from the structure of the case, and both are tuned to listbox events has changed. Because only once can be triggered at any time, the VI crashes (lock events the front panel (default) until the event can complement).

    You must use a unique event structure managing all events.

    The overall program architecture looks like inside-out for me.

    For the buttosn, you must use action lock (switch not release!) and use the value changed events.

  • Problem with the event

    Hello
    I am facing a problem with the events. Please Ref. Event.zip the attachment.

    AEv.vi is a LV2G used for the reading/Generate/Init/destroy the event. Test2.VI is a main vi (we must run this vi)

    The AEv.vi Init action must be done in the other vi (other than the Test2.vi:- but for the objective test I've initialized in Test2.vi only).

    Test2.VI is used for genetate event.

    I could have called statically AEv.vi inside the Test2.vi to generate an event... but the path that comes is decided when running... (I have many live similar to AEv.vi...) .. who decided at run time...)

    The problem:

    When I run Test2.vi, it gives me the error code 1 (try running test2.VI... it gives the dialogue on the occurrence of the error)...

    Can someone fix this?

    Thank you!

    I modified your screws to do what I think you want.  The way you did the user events will not work.  I added a line to send orders to Ev.vi

  • problem with the definition of a boolean as output parameter type

    Hi, I have a problem with the definition of type boolean as output parameter and it must return true if the query procedure retrieves one line else it shouuld return false

    Hi, I have a problem with the definition of type boolean as output parameter and it must return true if the query procedure retrieves one line else it shouuld return false

    And what are the issues? Its simple.

    SQL> create or replace procedure is_emp_exist
      2  (
      3     p_empno  in  emp.empno%type
      4   , p_result out boolean
      5  )
      6  as
      7     l_empno emp.empno%type;
      8  begin
      9     select empno into l_empno
     10       from emp
     11      where empno = p_empno;
     12
     13     p_result := true;
     14  exception
     15     when no_data_found then
     16        p_result := false;
     17  end;
     18  /
    
    Procedure created.
    
    SQL> declare
      2     l_result boolean;
      3  begin
      4     is_emp_exist (7788, l_result);
      5
      6     if l_result then
      7        dbms_output.put_line('Employee Exist');
      8     else
      9        dbms_output.put_line('Employee does not Exist');
     10     end if;
     11  end;
     12  /
    Employee Exist
    
    PL/SQL procedure successfully completed.
    
    SQL> declare
      2     l_result boolean;
      3  begin
      4     is_emp_exist (1000, l_result);
      5
      6     if l_result then
      7        dbms_output.put_line('Employee Exist');
      8     else
      9        dbms_output.put_line('Employee does not Exist');
     10     end if;
     11  end;
     12  /
    Employee does not Exist
    
    PL/SQL procedure successfully completed.
    
    SQL>
    
  • I can't import my script (film) into Adobe Story. The error message says that I am unable to connect to the Adobe servers. Is this a problem with the Adobe?

    I can't import my script (film) into Adobe Story. The error message says: I am unable to connect to the Adobe servers. Is this a problem with the Adobe?

    Yes and no it seems that if the file is a .doc or .pdf, that it does not load properly. But if I bring him in a Final Draft format, it works perfectly.

    Adam

    Sent from my iPhone

  • Strange problem with the keyboard event listener

    I have a full screen touch app. To close the application, I set an event listener on keyboard for the key "0". I don't want the press user due to some restrictions Alt + F4 key combination. Problems begin when the application loses focus. Here's the code;

    protected function onComplete(event:FlexEvent):void
    {

    this.setFocus ();
    this.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys, true, 0, true);

    }

    private void trapKeys(e:KeyboardEvent):void {}

    If (e.keyCode == 96) {}
    This.Close ();
    }

    Else if (e.keyCode == 48) {}
    This.Close ();
    }

    }

    When the user change the screen to a different with Alt + TAB application, or any other combination of keys flex app loses focus and does not work when he turns back to my app "0". How can I solve this problem?

    Thanks in advance.

    Hi, Ahmed.

    I have absolutely no problem with the solution you are trying to set up - you use mode full-screen interactive mode of keyboard?

    Please consider:

    on full add keyboard listener

    protected function applicationCompleteHandler(event:FlexEvent):void

    {

    this.stage.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

    };

    //

    protected function applicationActivateHandler(event:AIREvent):void

    {

    If (this.stage)

    {

    switch the State to display full-screen when activated

    If (this.stage.displayState! = StageDisplayState.FULL_SCREEN_INTERACTIVE)

    {

    this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

    };

    };

    };

    //

    private var exitHandled:Boolean = false;

    on NUMBER_0 | NUMPAD_0 exit-close

    protected function trapKeys(event:KeyboardEvent):void

    {

    If ((event.keyCode is Keyboard.NUMBER_0

    || event.keyCode is Keyboard.NUMPAD_0)

    (& this.exitHandled == false)

    {

    exitHandled = true;

    this.stage.removeEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

    This.Close ();

    };

    }

    (Note: applicaton of the events 'applicatonComplete' and "applicationActivate" are routed to over managers)

    Kind regards

    Peter

  • Problem with the onChange event

    Hello

    I am currently facing a problem with the onChange event when you use a datefield entry type.
    for example
    < cfinput type = "datefield" name = "date_txt" width = "175" mask = onFocus = "date_txt.disabledDays" dd/mm/yyyy"= [0.6]; "tabindex ="1"style =" "text-align: left" onChange = "checkDate (); ">

    And then, when I alert the selected date in checkDate function, I still get the old figure.
    for example
    public function checkDate (): Void {}
    Alert ("Date:" + date_txt.text);
    }

    For example if the date displayed is 05/05/2008 and I select another day (05/02/2008), then when the alert box appears, it still shows 2008-05-05.

    Any idea on how to solve this problem?

    Is this a bug with Flash Forms?

    Thank you and best regards,
    Yogesh Mahadnac

    I suppose that the function onchange occurs before the value of text is actually defined.
    Use the correct value
    Alert ("Date:" + date_txt.selectedDate);

    Ken

Maybe you are looking for