UCCX Scirpt: if statement (true of false)

Hi there,
Is it possible to change an if-statement from "true" to "false" or vice versa by calling an extension?
Thanks.

Yes.  You will need to practice this first before you try to implement it in your script.  Or, rather, I'm asking that you do.  Just learn the basics first.
First up, you will need to acknowledge that you will need to store this data somewhere persistent.  I.e., External database, external web server, or possibly even the Document repository.  I'll lead with the repository as it's easy and doesn't require the Premium license that the external database does.
Now that we've determine where we are going to store the data, you need to know how to store the data.  You do this in a script with a minimum of two steps:
Authenticate User
Upload Document
And one variable
User my_user = USER[uccxadmin]
Your user account may be called something different.  Authenticate the user first, then upload the document second.  Practice this in a new blank script using the F10 key (Step Over) via the Active Debugging feature.  No saving, uploading, application, trigger or phone call required.
Hint: Use the following as your Document to upload TEXT[true], use the following as your Language L[] and use the following for your name "my_file.txt"
Now that you've figured out how to store the data, let's figure out how to read the data.  In a completely new script, you'll need only two steps:
Set
If
*Three if you count the Annotate step.
And one variable
boolean my_value = true
Drop the Set step in a set it like so:
Set my_value = DOC[my_file.txt]
Next, drop in the If step and set it like so:
If (my_value)
    True
        /* It's TRUE */
    False
        /* It's FALSE */
Now, kick off that Active Debug again (F10) and check your work.  If you got it working, then the last thing you need to do, is figure out how to present the caller with a menu, 1 for TRUE and 2 for FALSE.  That's it.
Happy coding.
I hope that helped.

Similar Messages

  • QT Player 7 Recording State, True or False?

    Would some kind soul help me out here please. I've tried everything I know (which I admit, isn't much when it comes to Applescript) and haven't had any success. The first 2 comment lines below says what I need to get done. I can't figure out the syntax from the Quicktime Player 7 dictionary term "recording" ... assuming that's the key.
    tell application "QuickTime Player 7"
    close every window
    new audio recording
    activate
    --Wait here until user starts recording. Timeout if not started in x seconds.
    --Then wait here until recording is complete. Timeout if not complete in y seconds.
    --And here is where I export the audio in a specific format. (I've done this part.)
    end tell

    Strangely enough there doesn't seem to be any kind of state property for a document, so it's not trivial to determine if it's currently recording.
    --Wait here until user starts recording. Timeout if not started in x seconds.
    The best I could find is that the current time property is set to 0.0 for a new recording and increments based on the recording time, so it would be possible to craft something around that, e.g.:
    repeat 20 times -- give the user 20 seconds to start recording
      if current time of document 1 = 0.0 then
        -- we haven't started yet, so wait another second and check again
        delay 1
      else
        -- we have some recorded data, so exit the loop
        exit repeat
      end if
    end repeat
    --Then wait here until recording is complete. Timeout if not complete in y seconds.
    A variation on the above should work here - loop 30 times, each time checking the current time against the previously recorded time. If it's incrementing then the recording is still in progress. If it's the same as the previous check then the recording has stopped:
    set cT to current time of document 1
    repeat 30 times
      delay 1
      if current time of document 1 = cT then
        -- recording complete, so exit loop
        exit repeat
      else
        set cT to current time of document 1
      end if
    end repeat
    (all this is untested, but it should work, or at least give you an idea or two).

  • Can we save a True or False state in Labview?

    I'm using Labview 4.01 and I'm trying to control my testing process. In
    this case, I have 3 gas cylinders and every one of them can be turned on
    or off through the digital out lines. After one tank is empty, I can
    turn it off and turn on another one. My question is, how we can save
    this status either it's true or false so next time, we can open the
    other one instead of this empty one. After this one is turned off, I can
    show its state with an indicator, but the program can not read an
    indicator, so we still can not check the state of this tank. Any one
    have a solution for this problem?
    Thanks in advance,
    Guangde Wang

    Guangde Wang wrote:
    >
    > I'm using Labview 4.01 and I'm trying to control my testing process. In
    > this case, I have 3 gas cylinders and every one of them can be turned on
    > or off through the digital out lines. After one tank is empty, I can
    > turn it off and turn on another one. My question is, how we can save
    > this status either it's true or false so next time, we can open the
    > other one instead of this empty one. After this one is turned off, I can
    > show its state with an indicator, but the program can not read an
    > indicator, so we still can not check the state of this tank. Any one
    > have a solution for this problem?
    >
    > Thanks in advance,
    >
    > Guangde Wang
    Your version is too old. So I believe that saving data in any kind of
    configuration file will
    do the job (like .ini or .conf).
    It also depends on if you are closing application between your vi runs.
    If you don't remove the vi from memory, you have a chance to use global
    or functional global to store your state.
    In latest versions you can do it another way.
    Sergey Krasnishov
    Automated Control Systems
    National Instruments Alliance Member
    Moscow, Russia
    [email protected]
    http://acs.levsha.ru

  • The case structure is not working well on comaring two strings using true or false string matching VI

    I need an execution of commands after the reply from the instrument matches with the string I provided for that i used true or false string match VI on which the true string the matching command and the string is the reply from the instrument. And I put the further executionable commands in frame after frame of sequence loop in the true of the case structure. Amd finally I given all the output strings to the concatenate string to get all the replies as one loop. But when I execute the program the desired result is not available. So kindly please help me to overcome this problem.  
    Attachments:
    basic serial with changes.vi ‏24 KB

    You VI makes absolutely no sense and I would recommend you start with a few simple LabVIEW tutorials before trying to tackle this.
    What is the point of the FOR loop with 1 iteration, it might as well not even be there, same difference.
    Why is there an abort primitive in the FOR loop, this mean the program will unconditionally stop abort before any downstream code will ever go into action. The program will never get past the FOR loop.
    You created a circular data dependency and LabVIEW inserted a feedback node automatically, making things even worse. (see also)
    You need to learn about dataflow, execution order, and data dependency.
    You need to learn about the various types of tunnels (plain, autoindexing, etc.)
    There is a tremendous amount of duplicate code. Large code sections are the same, differeing only by a string. You should only have one copy of that code inside a proper state machine. Have a look at the design templates and examples that ship with LabVIEW.
    LabVIEW Champion . Do more with less code and in less time .

  • Parameter Query for True or False values

    I have what seems like a painfully simple task and it has me stopped dead.  I reviewed a similar thread, and the answers there don't seem to apply. Working in Crystal 11.5 with an MS SQL database.
    I am pulling data from vwCommmittees.  There is a field in this view called IsActive.  I want to create a committee list report that will allow the user to select only the active committees or all committees.
    A SQL select statement that says where dbo.IsActive = '1' will return only the active committees.
    In Crystal reports, if I place the IsActive field on the report, it returns with "True" or "False."
    When I create a parameter for this field, I find that 1) I can't see the parameter in the report expert -- my only choices are Is any value, Is true, Is false or Formula.
    I've made several attempts to create a formula and nothing is working. It's not clear to me wheter I should be creating a static or a dynamic parameter.  When I choose boolean as the type, that doesn't seem to help.  I tried a dynamic parameter which gave me true and false values, but don't seem to work.
    Any pointers on dealing with this kind of parameter query would be greatly appreciated.
    Sincerely,
    Ridge (in New Joisey)

    Hi..
    Create a static parameter and give the default values like
    0 and 1
    In Record Selection check like..dbo.IsActive = {?parameter}
    If the above is not working for you, then create a formula
    like..
    If dbo.IsActive = '1' then
    "Active"
    Else "In Active"
    Place this formula on your report and create a static parameter with default values Active and In Active.
    In record selection filter the above.
    Thanks,
    Sastry

  • Selectedcolor, true to the text true or false in the false print text

    Selectedcolor, true to the text true or false is false text into print.
    colorPicker component in, I select Export to a selected color, the color value myMC texte into summer, but accuracy can not control.
    If you'll be glad to help in this regard.
    yours truly
    Below is the AS3 code
    var myColorPicker:ColorPicker = new ColorPicker();
    myColorPicker.editable = false;
    myColorPicker.visible = false;
    myMC.visible= false;
    myColorPicker.addEventListener(MouseEvent.CLICK, clickHandler);
    myColorPicker.addEventListener(ColorPickerEvent.CHANGE, changeHandler);
    myColorPicker.move(20, 20);
    addChild(myColorPicker);
    function clickHandler(event:MouseEvent):void {
    event.currentTarget.open();
    var colorTransform:ColorTransform = myMC.transform.colorTransform;
    function changeHandler(event:ColorPickerEvent):void {
    colorTransform.color = myColorPicker.selectedColor ;
    myMC.transform.colorTransform = colorTransform;
    switch(myMC.colorTransform)
                case 1:
       myMC.colorTransform== 0xff0000;
                   break;
                case 2:
    myMC.colorTransform == 0x0000ff;
                              break;
                case 3:
    myMC.colorTransform == 0x00ff00 ;
                                 break;
    btn.addEventListener(MouseEvent.CLICK, butonClickHandler);
    function butonClickHandler(e:MouseEvent):void{
    if( myColorPicker.selectedColor == myMC.colorTransform ) {                
    text2.text="tebrikler doğru renk seçtiniz";trace(text2.text);}else{
    text2.text="yanlış tekrar deneyiniz";

    there's something wrong with that code either because you're nesting named functions or because of this forum.
    and that switch-statement makes no sense.
    and a colorTransform has a color property but it's not a color.
    and your last if-statement will always be false because movieclips don't have a colorTransform property.  they have a transform property and that has a colorTransform propery.
    and then you should be comparing your color picker's selectedColor with myMC.transform.colorTransform.color.
    copy and paste your code and make sure it's formatted so it's readable.

  • True or false game problem

    hey all, its me, the java noob!
    i've been trying to make a true or false game in which the user has to do the obvious with two of the buttons and press go to start the whole thing.
    however, my program has seriusly gone fooba, it says the wrong wrong answere statements, it jumps to another question whe i give an answere and soemtimes says i'm wrong when i'm not. what am i doing wrong?
    i'm seriusly confused about what i did wrong. here's the code:
    import java.util.Random;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    import java.awt.FlowLayout;
    class TF extends JFrame implements ActionListener{
         public static void main(String args[]){
              new TF();
         int otherNum = 0;
         int TFnum = 1;
         JButton t = new JButton("true");
         JButton f = new JButton("false");
         JLabel tf = new JLabel();
         JButton BUtton = new JButton("go!");
         public TF(){
         setDefaultCloseOperation(EXIT_ON_CLOSE);
         setLayout(new FlowLayout()) ;
         add(tf);
         tf.setVisible(false);
         add(BUtton);
         BUtton.addActionListener(this);
         add(t);
         t.addActionListener(this);
         t.setEnabled(false);
         add(f);
         f.addActionListener(this);
         f.setEnabled(false);
        pack();
        setVisible(true);     
         public void actionPerformed(ActionEvent e){
         if(e.getSource() == BUtton){
              t.setEnabled(true);
              f.setEnabled(true);
              tf.setVisible(true);
              BUtton.setEnabled(false);
        int tfr = new Random().nextInt(10) + 1;
         switch (tfr) {
         case 1:
         TFnum = 2;
         otherNum = 1;
         tf.setText(" chess was first invented in India");
         break;
         case 2:
         otherNum = 2;
         TFnum = 0;
         tf.setText("Calvin and hobbes were both names of people in the past one was named Jhon Hobbes and the other named Thomas Calvin t/f");
         break;
         case 3:
         otherNum = 3;
         TFnum = 2;
         tf.setText("a microphone needs a windscreen which is usually made of polyster t/f");
         break;
         case 4:
         otherNum = 4;
         TFnum = 0;
         tf.setText("octopus's ink squirt is a good defense, however, the smell the ink lets off creats a direct path towards the octopus t/f");
         break;
         case 5:
         otherNum = 5;
         TFnum = 2;
         tf.setText("Monty Python and the holy grail planned to have a sequal in 1990, but that idea was posponed t/f");
         break;
         case 6:
         otherNum = 6;
         TFnum = 0;
         tf.setText("the molecules of water are structiored so that the o is in the middle and the 2 H's are either sides at 180 degrees. t/f");
         break;
         case 7:
         otherNum = 7;
         TFnum = 2;
         tf.setText("the famous series Doctor who first started in 23 November 1963 t/f");
         break;
         case 8:
         otherNum = 8;
         TFnum = 0;
         tf.setText("the oldest known dice is 5500 years old and was found in russia, it was made from the hoof of an animal t/f");
         break;
         case 9:
         otherNum = 9;
         TFnum = 2;
         tf.setText("the yumi longbow was designed to be easilly fired from horseback t/f");
         break;
         default:
         otherNum = 10;
         TFnum = 0;
         tf.setText("Albert Einstien invented the first laser, albeit only a maschine which caught and concentrated sunlight.");
         break;
         if(e.getSource() == t) {
              t.setEnabled(false);
                 f.setEnabled(false);
            if(TFnum == 0) {
                 t.setEnabled(false);
                 f.setEnabled(false);
                  if(otherNum == 2){
                   tf.setText("you lose, it was Jhon Calvin and Thomas Hobbes (I switch names around)");
                  if(otherNum == 4){
                   tf.setText("you lose, the ink blocks all sense of smell");
                   if(otherNum == 6){
                   tf.setText("you lose, the H's are at 104.45 degrees, so nearly a triangle shape");
                  if(otherNum == 8){
                   tf.setText("you lose, actually, its 5000 years old and was discovered in eastern Iran as part of a backgammon set");
                  if(otherNum == 10){
                   tf.setText("you lose, he set the principal but never invented it.");
             } else {
             tf.setText("you win!!!");
        if(e.getSource() == f) {
            t.setEnabled(false);
                 f.setEnabled(false);
        if(TFnum == 2){
          tf.setText("you lose");     
          } else {
          tf.setText("you win");
      }i get absolutely no error messages but everything does exactely what its NOT meant to do
    if you help me : THANK YOU VERY MUCH !!!!! :)

    well, it vary's, but the overall picture is that when i get
    A) the true button when its false, it gives a Random answere instead of the one i need e.g. when i say that Einstien did invent the first laser (which is bollucks) it says "you lose, the anlgles at which the H's stand to the o is 104.45 degrees" which is not whatits meant to do because that was the answer for a chemical question.
    B) when its false and i click false, it goes perfect!
    C) when i click true and it is true,it goes completely and uterly mad and tells me some sort of "you lose" statement.
    hope that helps

  • $100 off MacBook (student discount) + $100 BBY gift card? True or false?

    I've been hearing that in addition to the $100 off students get on Macbooks there is also an additional $100 Best Buy giftcard. Is this true or false? Why is the giftcard being offered and is it offered everywhere? Is it to price match the $100 app card Apple is offering?

    This from their Terms and Conditions. It would appear that you would not be elligible to even purchase using the education store to obtain the afformentioned pricing/deal. I don't know why going into a physical Apple Store would relax the policy. That is, unless they simply "overlook" the policy.
    Eligibility
    Those eligible to purchase from the Apple Store for Education Individuals include faculty, staff, students and parents as follows:
    K12 - Any employee of a public or private K-12 institution in the United States is eligible, including homeschool teachers. In addition, school board members who are currently serving as elected or appointed members are eligible. PTA or PTO executives currently serving as elected or appointed officers are eligible.
    Higher Education - Faculty and staff of Higher Education institutions in the United States; and students attending, or accepted into a Higher Education institution in the United States are eligible to purchase. Purchases from the Apple Store for Education Individuals are not for institutional purchase or resale.
    Higher Education Parents - Parents purchasing on behalf of their child, who is a student currently attending or accepted into a public or private Higher Education Institution in the United States, are eligible to purchase.

  • Applescript help with true or false script

    I'm in need of a applescript that will run two different scripts based on the outcome of an existing file.
    I have a folder called Status. Inside this folder is a simple text file called Good.rtf
    I would like a script that would run one or the other script base on the true or false output.  If file exists then:
    true will
    run script A
    false will
    run script B
    I have been searching the web for two days looking for something to help me get started on this and have not had much success.
    Please help me.   I really would appropriate any help or guidance. 
    Thanks....
    Ron

    Ron
    AppleScript calls this kind of script a "Conditional" = if this > then that
    Some templates are in MacintoshHD/Library/Scripts/Script Editor Scripts/Conditionals
    You don't need a value for "false" in binary as it is merely "not true" (else)
    if true then
        -- insert if actions here
    else
        -- insert else actions here
    end if
    If you already have your Scripts A & B working, copy>pastethem into the "insert actions here" part as appropriate
    ÇÇÇ

  • [Help plz]Can't set a boolean attribute to true or false

    Hello,
    I'm new in NWDS development. I need to develop a download functionality
    I used a FileDownload UIElement for that and I created a node context (ExcelExport) with 3 attributes :
    - ExcelFile
    - ExcelIcon
    - And ExcelEnabled (Boolean type)
    My problem is that everytime I try to set the attribute ExcelEnabled to true or false, it return me a java.lang.NullPointerException
    I'm binding this attribute with "Enabled" property of the UIElement.
    Have anyone got this error before? Thanks a lot for your help.
    Kind regards,
    Safae.

    Hello Safae,
    Have you tried to put true/false value for the enabled property? I mean without using a context attribute?
    Also try to create the attribute out of the node.
    Regards,
    ImaneA.

  • How to set render true or false in java class

    Use case:
    i have a page in which i have one inputListOfValues attributes and two LOV .initial the LOV render attribute value is false .it means it show only one attribute in run time .inputListOfValues is content two value .suppose if first value A then the first LOV have to show and is it value is B then Second LOV have to show .i bind my LOV to class .but i do not know how to set render attribute at java class.

    <af:inputListOfValues label="Branch Name"
    popupTitle="Search and Result Dialog"
    id="ilov1"
    model="#{pageFlowScope.organizationLOV.param['bindings.Organization'].listOfValuesModel}"
    converter="#{pageFlowScope.organizationLOV.param['bindings.Organization'].convert['latinDesc']}"
    valueChangeListener="#{viewScope.salaryBenefitsReportForm.branchChange}"
    binding="#{viewScope.salaryBenefitsReportForm.branchName}"
    rendered="true" visible="false"/>
    <af:inputListOfValues label="Department Name"
    popupTitle="Search and Result Dialog"
    id="ilov2"
    model="#{pageFlowScope.objectLOV.param['bindings.Department'].listOfValuesModel}"
    converter="#{pageFlowScope.objectLOV.param['bindings.Department'].convert['latinDesc']}"
    valueChangeListener="#{viewScope.salaryBenefitsReportForm.departmentChange}"
    binding="#{viewScope.salaryBenefitsReportForm.departmentName}"
    rendered="true" visible="false"/>
    this is code in jsff .
    and class code are following
    public void reportBy(ValueChangeEvent valueChangeEvent) {
    String value=(String)valueChangeEvent.getNewValue();
    System.out.println(value);
    if(value.equals("Branch")){
    branchName.setVisible(true);
    departmentName.setVisible(false);
    AdfFacesContext.getCurrentInstance().addPartialTarget(branchName);
    AdfFacesContext.getCurrentInstance().addPartialTarget(departmentName);
    if(value.equals("Department")){
    departmentName.setVisible(true);
    branchName.setVisible(false);
    AdfFacesContext.getCurrentInstance().addPartialTarget(departmentName);
    AdfFacesContext.getCurrentInstance().addPartialTarget(branchName);
    }

  • Is this TRUE or FALSE ?

    Hi all,
    Pls tell me whether this sentence is true or false.
    A transaction used by a BMT bean MUST have been started by the bean.
    In book this question is marked as false, but as far as I think it should be true.
    Pls update.
    Regards,
    Sanjeev

    As it's written I would say it's true as well.
    Bean-managed transactions are only allowed for session beans(stateful and stateless) and message-driven beans. Furthermore, if there is any client transaction context propagated on the call to the BMT bean, the container is required to suspend the client tx before calling the business method. So, BMT beans cannot inherit client transactions.
    For BMT stateless session beans and message-driven beans, there cannot be an active user transaction when the business method completes. If there is, the container is required to treat it as an error.
    The slightly more interesting case is for stateful session beans. For BMT SFSBs, it's o.k. for the transaction to still be active when the business method returns. In that case, the container suspends the tx and assoicates it with the SFSB. Whenever the SFSB is invoked again, the previously associated transaction is resumed before the business method is called. ( The same rule holds for client transactions. If there is one, it will be suspended and resumed when the business method completes. ) However, even if the container resumes a previously suspended transaction before invoking the SFSB, it can only be a transaction that was started by that bean.
    --ken

  • DisAppointed news  Sun Solaris  forum ????????? True or False

    hello Friends ,
    I read some disappointed news on this forum
    that sun would not continue support for intel edition
    i donot know it is true of false
    Any tell me what is exact matter on
    following email :- [email protected]
    or reply this letter

    Cross-posted
    Sun Solaris 5.10 - SSH 1.1.3-Not able to connect to server with ssh -Urgent
    @O.P.
    Don't do that.
    In the future, pick the most appropriate forum and make your post.
    Cross-posting is considered to be the same as rude spamming.
    I'm not aware of any forum web-site-of-value that would encourage cross-posting in its etiquette guidelines.
    ... and as far as "Urgent" goes?
    This web site is for the end-user community to gather and discuss various topics in general conversations. Your self-imposed time pressures are irrelevant. If you need actual technical support for something, then log a support case and pay for a speedy answer.
    See the FAQ link at the top of the page.

  • Item Event - BeforeAction - true or false?

    Hi,
    Is there a basic rule for BeforeAction?
    I know you can play with BeforeAction for personal use; but it is there a basic rule like:
    et_CLICK: then it is BeforeAction == false
    I like to know for following event:
    et_CLICK
    et_COMBO_SELECT
    et_MATRIX_LINK_PRESSED
    et_MATRIX_LOAD
    et_CHOOSE_FROM_LIST
    et_MENU_CLICK
    Is there a Pattern for BeforeAction for ALL Item Events?
    Thank you,
    Rune

    Hi Rune,
    there's no real rule, because the events are different.
    but usual it is before/after displaying or before/after mouseup
    EventType | beforeaction = true | beforeaction = false
    et_CLICK | before you release the mouse button/Button is pressed | after you release the mousebutton
    et_ITEM_PRESSED | before you release the mouse button | after you release the mousebutton
    et_COMBO_SELECT | Selection has not changed | Selection has changed
    et_MATRIX_LINK_PRESSED | before you release the mouse button/Button is pressed | after you release
    et_MATRIX_LOAD | matrix is empty | matrix is loaded
    et_MENU_CLICK | Button is pressed/before release on menu item (without submenus)  | after release
    et_CHOOSE_FROM_LIST | before the Choose From List form is displayed | displayed
    any other questions ?
    greetings to montreal
    David

  • Is that True or False ?

    I recieved a message from e-mail told me that the nokia can Detect Radar on the road
    Nokia Speed Trap Detector
    The settings for radar speed traps detector.
    Your Nokia cell phone can be programmed to pick
    up radar speed traps, when programmed your cell
    phone picks up the radar and alerts you on the
    message alert tone. ( Doesn't work with Nokia
    7110! )
    1. Enter your menu
    2. Select settings
    3. Select security settings
    4. Select closed user group
    5. Select on
    6. Enter 00000
    7. Press ok
    8. Clear back to normal, within a few seconds
    your phone will display a radar sign with five
    zero's next to it. It is now activated.
    Unfortunately only Nokia phones have this
    function. Cell info display needs to be de-
    activated. Settings -> Phone Settings -> Cell
    Info display
    Each time you turn off your phone, or even each
    time you loose contact with your carrier, you'll
    have to activate it again... It is done by steps
    1 through 5, but the number (00000) will be
    already on the field as default.
    Is that True or False ?

    It is false.closed user group is an operator based service by which your phone can be made to make phone calls only to those numbers in that group id.it is service provides dependant.contact your operator.

Maybe you are looking for