How to verify that the variable "does not contain" a value?

Hi
I am using CP 7.0.1.237.
We want to use Text Area widget for a custom quiz and verify an answer. While we figured out how to verify the existence of certain keywords, we are not able to figure out how to verify that the content should NOT contain certain keywords. For example, we want to ensure that the text entered in this widget should not contain "Transformation" and "Non-compliant".
Is this possible at all?
Thanks
Sreekanth

Here's what the solution might look like in JavaScript.  This would be for SWF output and aimed at Cp 7.  For Cp 8, this would still work for SWF output, but you'd probably want to take advantage of the new unified JS API that gets and sets Cp variables for both SWF and HTML5 output.  You can read more about that here:  Common JS interface
//Get the text area value from Captivate (SWF output Only)
var cpTextAreaValue = document.Captivate.cpEIGetValue('m_VarHandle.v_TextArea);
//convert the value to lower case to properly compare
cpTextAreaValue = cpTextAreaValue.toLowerCase();
//Check if text area value contains the words "transformation" or "non-compliant"
if(cpTextAreaValue.indexof('organizational') > -1 && cpTextAreaValue.indexof('behavioral ') > -1 && cpTextAreaValue.indexof('managerial') > -1 && cpTextAreaValue.indexof('transformation') < 0 && cpTextAreaValue.indexof('non-compliant') < 0){
  //the text area has the correct answer so increment varScore
  //get the current score from Captivate
  var score = document.Captivate.cpEIGetValue('m_VarHandle.varScore');
  //increment score by 1
  score++;
  //set score in Captivate
  document.Captivate.cpEISetValue('m_VarHandle.varScore', score);
} else {
  //the text area does not have the correct answer so show message to user inside of Captivate
  document.Captivate.cpEISetValue('m_VarHandle.v_message', 'Answer is not correct');
This JS has not been tested.  Note that the "does not contain" operator is done using the "indexof" operator in JS. 
Jim Leichliter

Similar Messages

  • HT1212 I am trying to restore a phone that the screen does not work on, therefore I can't input my password.  How can I bypass this and upload it to itunes?

    I am trying to restore a phone that the screen does not work on, therefore I can't input my password.  How can I bypass this and upload it to itunes?

    You could follow the instructions in the support document that you linked from. There is a section regarding the passcode and the inability to use it or enter it. However, you may encounter more issues since you cannot use the screen.

  • I'm trying to download the trial version of Adobe Illustrator. An error message says that the OS does not meet the minimum system requirements for the installer. 10.6.0 is the minimum required for installation. How do I get my mac to be a 10.6.0 ?

    I'm trying to download the trial version of Adobe Illustrator. An error message says that the OS does not meet the minimum system requirements for the installer. 10.6.0 is the minimum required for installation. How do I get my mac to be a 10.6.0 ? Right now I have a 10.5.8 is there a way to upgrade or something?

    Buy the Snow Leopard retail installer (http://store.apple.com/us/product/MC573Z/A?fnode=MTY1NDAzOA).
    That will take you to 10.6.3.
    If required you can then use the combo updater to get to the latest version, 10.6.8 (http://support.apple.com/kb/DL1399)
    SL system reqmts;

  • I have tried to reinstall CS3 extended student version to my new comuter from the dvd and also from the web download but it does not work - I get the information that the server does not work- why. How should I do?

    I have tried to reinstall CS3 extended student version to my new comuter from the dvd and also from the web download but it does not work - I get the information that the server does not work- why. How should I do?

    Well the error message is in Swedish but says: The installation program database is damaged. Please contact the Adobe support (which is a hard thing to do!!). I use Windows 7 Home Premium with service pack 1.
    Från: Mylenium 
    Skickat: den 29 december 2014 16:48
    Till: Tony Bohman
    Ämne:  I have tried to reinstall CS3 extended student version to my new comuter from the dvd and also from the web download but it does not work - I get the information that the server does not work- why. How should I do?
    I have tried to reinstall CS3 extended student version to my new comuter from the dvd and also from the web download but it does not work - I get the information that the server does not work- why. How should I do?
    created by Mylenium <https://forums.adobe.com/people/Mylenium>  in Downloading, Installing, Setting Up - View the full discussion <https://forums.adobe.com/message/7050595#7050595>

  • How can I merge folder with the same name so that the content does not replace the other

    How can I merge folder with the same name so that the content does not replace the other?

    >
    That's only a good idea if the semantics of sayHello
    as defined in MyInterface suggest that a
    RemoteException could occur. If not, then you're
    designing the interface to suit the way the
    implementing classes will be written, which smells.
    :-)But in practice you can't make a call which can be handled either remotely or locally without, at some point, dealing with the RemoteException.
    Therefore either RemoteException must be part of the interface or (an this is probably more satisfactory) you don't use the remote interface directly, but MyInterface is implemented by a wrapper class which deals with the exception.

  • My problem is that the iPod does not turn on. Everytime I attempt to turn it on it shows the Apple logo then a small icon showing a sad face with a warning sign.

    IS MY IPOD DEAD?!?!?!?!?
    I think I have the previous iPod Classic with a black glossy front and I am pretty sure it is glass at the front. My problem is that the
    iPod does not turn on. Every time I attempt to turn it on it shows the Apple logo then a small icon showing a sad face with a
    warning sign along with the Apple support website. At the same time I can hear the internal mechanics which is also very loud. I have attempted
    to charge it as well as connecting it to itunes but no success. Could you please help?

    Try:                                               
    - iOS: Not responding or does not turn on           
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try another cable                     
    - Try on another computer                                                       
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar                                     

  • Best way to announce that the hardware does not meet the minimum requirements

         Hi Everybody!!!
         I'm in the process of tiding my App up, and I stumbled into a requirement that needs to be addressed. I'm not quite familiar with the latest trends, so I was wondering if anybody could recommend a way to inform the user if the hardware
    to use does not meet the minumum requirements.
         In a nutshell:
     * I just created a game using Direct3D / DirectX 11,
     * I'm using "DrawIndexedInstanced", which means that the videocard to use should meet at least DirectX v10 (my shaders are using model 9_3 but I tested it in a computer with DirectX9 model 3 (or so the nvidia brochure said), and the game pretty
    much died in my arms).
     * According to the App Certification Requirements: "if you choose a minimum feature level higher than 9_1, your app must detect at launch whether or not the current hardware meets the minimum requirements. If not, the app must display a message to
    the customer detailing the Direct3D requirements."
     * I know how to detect the Direct3D level supported by the current videocard. What I would like to know is how to tell the user that the videocard does not support the minimum requirements.
         I don't have much knowledge about the current trends:
     * I assume that displaying a message box may not be the best option, as that would mean I need to link the MFC layer to do so (the game is in Visual C++ and that's what I would do if it were one of my day-job projects). I'm quite sure that
    is too much of a library just to show a message box... not to mention that most likelly the MFC is no longer supported in a Metro application...
     * I was thinking about displaying a nice graphic warning about the issue, but if the D3DDevice1 is not what I expect then I don't think I can be sure that at least it can display the graphic with the information.
     * I'm not quite sure if I should be linking to a .NET Library ("System.Windows.Forms" comes to mind), but then again maybe it's too much of a library for just a messagebox.
     * Then again, displaying that message in a command prompt may not be the best idea either.
         Any help is greatly appreciated!!!
         Best Regards,
         Tarh Ik
    Tarh ik

         Hi Chuck,
         I tried your idea, but the game always crashed when calling the DrawIndexedInstanced() function in a computer that only supported DirectX Level 9.1 (plenty of those computers at my day-job, sometimes I swear this office could be
    a museum). The crash started as a driver unload call, and after that everything goes down.
         I also tried using the WARP mode, but the performance was horrible, and after a minute of playing I started to have temperature issues with the CPU (I did not see that one coming)
         What I finished doing was to create two sets of shaders (pixel and vertex):
     * If the feature reported by D3D11CreateDevice was 9_3 or above, I'd use my very own and happy shaders, compiled in 9_3 model. Beautiful performance with DrawIndexedInstanced().
     * If on the other hand the feature reported by D3D11CreateDevice was either 9_2 or 9_1, I'd use a set of shaders compiled for level 9_1. That seemed to be enough to draw a couple of images on the screen and tell the user, using my own game elements,
    that the computer did not match the hardware requirements.
          It looks like this was a good approach. My game passed the certification test, and it is currently on the AppStore.
          Best Regards,
          Tarh Ik
    PS: This posting has been posted "AS IS"
    Tarh ik

  • I cannot email photos from the iphoto program?  Message says that the server does not recognize password or username?

    When trying to email  a photo from the iphoto program a message appears saying that the server does not recognize the password/username.  How do I correct this?

    You've posted twice. I replied here: https://discussions.apple.com/thread/3421137?tstart=0

  • TA48312 Hello I have a Mac Mini with OS 10.7.5 And I have a problem that the mouse does not do a right mouse ... I have the mouse model a1197 What should I do? Thank you

    Hello I have a Mac Mini with OS 10.7.5 And I have a problem that the mouse does not do a right mouse ... I have the mouse model a1197 What should I do? Thank you

    Why is there no iDVD on my new Mac? How do I get it and how do I install it?
    https://discussions.apple.com/docs/DOC-3673

  • Hr_maintain_masterdata showing an infotype that the user does not have auth

    subject: hr_maintain_masterdata showing an infotype that the user does not have authorisation for
    Hi all,
    I've a user account that's meant to perform staffing, based on the actual HR role.  The system is also set up with an infogroup that contains infotypes 0000, 0001, 0006, 0185, XYZ and other infotypes; XYZ representing an actual infotype.  The HR role is not supposed to have this infotype XYZ.
    When PA40 is used, infotype XYZ will be skipped, as the user account do not have authorisation for it.  I could then proceed to create the record.
    When the fm: hr_maintain_masterdata is used, I was prompted that I do not have authorisation for infotype XYZ.
    I have setup my fm with the mininum amount of values, as indicated below.
    I did not populate a table for "proposed_values" so the infotypes called were due to the actions of the infogroup.
    fm: hr_maintain_masterdata
    pernr = 01234567
    massn = 01          (new staff)
    actio = INS          (insert record)
    tclas = A          (master record)
    begda = 01.09.2010
    endda = 31.12.9999
    werks = myCompanyPlant
    dialog_mode = 2     (online)
    luw_mode = 1          (commit, if no errors encountered)
    no_existance_check = X
    Q. Is there any way to let the function module call the infotypes, with authorisation checks, as what PA40 is doing?
    Your guidance would be appreciated.
    Thank you,
    James Wong

    A behaviour that has been observed was that, after infotype 0185 was saved, the function module throws me back to infotype 0000, citing, "No authorization to maintain XYZ exists".  Data that I had populated to the screen, either via the FM or by manual input were cleared.  If I skip the next 4 screens, I'll arrive at the Infotype after XYZ, with the data populated.  Subsequent infotypes also have their data filled in.
    Once I complete the sequence, the personnel record will be created.  Upon examination, the frist 4 screens that were skipped in the 2nd pass contains data that were entered in the 1st pass.
    My question, as posted in the original post, is why infotype XYZ is triggered by the function module, as the staffing account does not hae access for it.  If I repeat the process using PA40, the infotype is skipped accordingly.
    Any help would be appreciated.
    Thank you,
    James Wong,

  • When i connect my ipad with my pc i always get the answer that the PC does not identify my pad

    when i connect my ipad with my pc i always get the answer that the PC does not identify my pad

    Hi there,
    You may like to try the steps outlined in the site I have linked to below. The site was not made for your issue, but should help nonetheless.
    iPad Assistant iTunes
    Regards,
    Nathan

  • TS3899 When I send an email I get an error message that the receiver does not allow "relaying" it doesn't matter who the recipient si

    When I send/forward an email I get an error message that the recipient does not allow "relaying". It doesn't matter who the recipient is.

    Go into Settings>Mail, Contacts, Calendars>your account>Outgoing mail Server>SMTP>Primary Server then turn Server ON and fill in both User Name & Password>under Outgoing Mail Server.

  • Excel cannot open the file beacuse the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file [help]

    Hi,
    I have a excel file that I have been using since beginning of year.
    Yesterday, I tried to open it but a message comes out "
    Excel cannot open the file beacuse the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"
    After I click yes, the page is blank. The file is about 400kb in size.
    I have try open and repair and third party repair program and not working also.
    I would appreciate a lot if you can help me.
    Thank you very much.

    Per your post, this problem might be caused by malware on the affected machine.
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2013/09/07/quot-cannot-open-the-file-because-the-file-format-or-extension-is-invalid-quot-opening-office-files.aspx
    In order to clean your machine, run Microsoft Safety Scanner (http://www.microsoft.com/security/scanner/en-us/default.aspx) to kill the malware, and then repair Excel file itself.
    If this is not the case, feel free to post back and let me know. Thanks.
    Tony Chen
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • I purchased a program on Mac App store and the program does not act as it should,  also was required to pay up front whereas had I went to the web site, ibank 4 I would have had 30 days free trial an would have found that the program does not work.?

    I purchased a program on Mac App store and the program does not act as it should,  also was required to pay up front whereas had I went to the web site, ibank 4 I would have had 30 days free trial an would have found that the program does not work.?

    Free trials are not available through the Mac App Store.
    Apple is not here. Apple does not answer questions here. This is a user to user support forum. There are only folks here who use Apple products.

  • What does the v3 WRE54G do that the v2 does not?

    Does anyone know what the difference is between the WRE54Gv2 and WRE54Gv3?
    I know that the first model, which I'll call "v1" for now, did not have a wired network socket at all. Without the RJ-45 socket, the v1 was unable to create a wired WDS extension. Without a wired extension, WDS extenders such as the WRE54G must chop wireless throughput in half.
    The RJ-45 network socket on the v2 makes the extender far more versatile. It can be used as a wireless bridge or a wired WDS extension, which does not chop your wireless throughput in half. My complaint is the position of the RJ-45 network socket. When the expander is mounted on the wall or plugged into a wall socket directly, it would be most convenient for the network socket to be at the bottom.
    Could someone let me know if the placement of the RJ-45 socket is something that has changed with the v3?
    I see the FAQ as a "sticky" post at the top of the message board mentions that the WRE54G "does not support WPA encryption at this time." I believe that this was simply a copy-paste from an old FAQ regarding the v1, but I cannot say for sure.
    Does anyone know if the v2 or v3 support WPA with current firmwares? WPA support is an absolute must-have feature for me.
    Also, it appears that GPL code is available on the support page for the v2 and for the v3.
    Are all versions really Linux-based? ...or did Linksys simply place links to the v1 GPL code on the support page for every hardware version?
    Thanks, all!Message Edited by Ichinisan on 05-20-200709:05 AM

    It's incorrect to say that the socket is only for initial configuration. WRE54G v2+ supports a wireless bridge mode, which has the device connected directly to another device over cat5 ethernet.
    Also, without the ethernet cable, wireless throughput is cut in half for all wireless devices (even the ones that are closer to the source AP/router). This is true of all WDS-compliant range expanders because all LAN traffic on one AP must be re-transmitted to the other. With a wired ethernet cord going from the source AP/router, the two APs can talk to each other through the wired connection and it's not necessary to cut the wireless bandwidth in half. It's not clear if the Linksys products will take advantage of the wired connection in this way.

Maybe you are looking for