How to set a dynamic validation message in javascript

Hi,
I am using the "validate" event on a field, along with the "script message" field, to make a validation and send a message to the user if the test fails.
- Is it possible to define parameters in this message, for example "field &1 is invalid" where we replace &1 by the name of a field?
- Is it possible to send 2 different messages (I guess it's like using a message &1)?
- What is the best practice according to your experience?
Notes:
- I am aware of the xfa.host.messageBox, but I'd like to keep Adobe logic for validations (am I wrong? why?)
- I also saw the possibility of binding a field from the context, to the message field, but I found that it was not very clean to do this way (if even possible)
Thx !

According to the tests I did since yesterday, it is very difficult to use the "validation script message" (in the "value" tab of a "text input" field, within a dynamic table), for sending a dynamic message.
I abandon, and prefer to use use
xfa.host.messageBox( "dynamic message text" )
For information, I could change the message during "validate" event, with a rather complex algorithm.
Unfortunately, when a table row is just added (dynamically, with a button), though the message has been changed, it displays the original value. When I change the field again, the changed validation message is taken into account. I don't know why.
Edited by: Sandra Rossi on Jul 24, 2009 9:01 AM : it's only to say that since then, this was the only solution! Question closed

Similar Messages

  • How to set up Dynamic Variants for job which is based on Pay Period

    Hi,
    We need to set up dynamic variant for payroll interface.  This interface is based on Pay periods and that is why we need to use different variant for each month.  Letus know how to set up dynamic variant which will take care of Pay Periods

    Hi,  Thnx for reply.
    We are not changing the control records, current period will be some old period in system. 
    payroll is not processed in SAP,

  • How to set a dynamic textfield?

    How to set a dynamic textfield that can baseon the user input data to resize the textfield height and width? Beside, I would like to copy the MS word table into the Form textfeild with the original design, how to do that? Many thanks!

    You need to check two things:
    1- Make sure to check the "Allow Multiple Lines" under the object tab.
    2- Check the Expand to Fit checkboxes under the layout tab.
    Jasmin

  • How to Set "DateOnly" property in DateTimeControl using Javascript.

    How to Set "DateOnly" property in DateTimeControl using JavaScript.

    Is there any specific reason you want to set it through JavaScript ? You can directly set the DateOnly property in the markup itself.
    <SharePoint:DateTimeControl runat=server id="dtControl" DateOnly="true"></SharePoint:DateTimeControl>
    Please can you elaborate on what exactly is the requirement for setting this through javascript?
    Geetanjali Arora | My blogs |

  • How to get UI page validation messages?

    Hi,
    I have problem regarding Front End validation messages..how to get this
    in my project i have a form with some fields
    i need to generate small pop up message "already exist" for entering same values for perticular
    columns (when click the tab for next column then i need message)
    can any body help me..

    Community Feedback and Suggestions (Do Not Post Product-Related Questions Here)
    Mod: locking.

  • How to set Priority of JMS message in the Receiver adapter

    Hi,
    How can I set the priority of message going to MQ in the receiver JMS adapter. I tried to set a value in the <b>JMS message Priroty</b> field. But it is not working.
    In the receiving  queue manager the default priority of the queue which receives data is set to 0.
    Can anyone suggest how to get this done.
    Thanks in Advance
    Abinash

    Hi Ravi,
    If I am not wrong You are referring to article <b>Queues for Prioritized Message</b>. But this is about how to Prioritize message inside XI.
    What I am intresetd in is to set a message priority (for example "2")for the message going to MQ. That is when the message reached the detination queue the priority of this message should be 2 in the queue.
    Thanks
    Abinash

  • How to set a dynamic filter to a prompted one?

    Hello:
    I have a dashboard prompt whose values determine the columns for a constructed dynamic filter column using case statement.
    There is another dashboard prompt whose value determine the the values for the dynamic filter column.
    I have a need to set this dynamic filter to the operator 'is prompted'. According to the OBIEE documentation, the requirement for 'is prompted' filter is to have the dashboard prompt column match with the filter column.
    I currently use a presentation variable for the dashboard prompt column that gives the filter value.
    How do I make my dynamic filter to be prompted (for pre-filtering results as a default behavior) and subsequently use the presentation variable (derived from the dashboard prompt) if a user enters the appropriate prompt values?
    Here is an example:
    Dashboard prompt: Location Type-> (State, District, City) (The case statement on my filter determines the appropriate logical column State or District or City)
    Filter Value: Dallas (pv1)
    The dynamic filter will generate "City" = '@{pv1}' (Dallas in the above example)
    I want this dynamic filter to be set to 'is prompted' for pre-filtering results as a default behavior.
    Thanks for reading this far and looking forward to your suggestions.
    Regards
    Sankar Bala

    Please read this carefully, you may find what you are looking for:
    Dynamic dashboard prompts and columns used in multifunctional report, full guided navigation
    http://108obiee.blogspot.com/2009/08/dynamic-dashboard-prompts-and-columns.html
    Or this one:
    http://obiee101.blogspot.com/2009/04/obiee-dynamic-prompt-content.html
    Regards
    Goran
    http://108obiee.blogspot.com

  • How to set EXPORT parameter from message mapping

    Again, ask the question of export parameter.
    I wrote a java version transformation and it worked good with export parameter.
    However I can not work it out in graphical message mapping. I refered http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm.
    In PI7.1, I add an export parameter "EXPORT_PARA" in the "Signature" tab. Are there any special step to assign this parameter to an UDF? I did not find a way to do it.
    And then I define an UDF,
    public String SetExportPara(String sss, Container container) throws StreamTransformationException{
    String str = "GOOD";
    GlobalContainer gc = container.getGlobalContainer();
    OutputParameters paras= gc.getOutputParameters();
    if(paras.exists("EXPORT_PARA ") == true) {
    paras.setString("EXPORT_PARA ", str);
    }else {
    str = "NOT FOUND EXPORT_PARA";
    return str;
    And I assign this UDF to one element of my output XML, I tried to run it in IE, it always output "NOT FOUND EXPORT_PARA.
    why?????
    I know there is a blog : https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8654. [original link is broken] [original link is broken] [original link is broken]
    But it did not talk how to set export parameters.

    Hi,
    i read thread
    How to export parameters from Message Mapping
    and blog
    /people/jin.shin/blog/2008/02/14/sap-pi-71-mapping-enhancements-series-parameterized-message-mappings
    but not found issue
    in this topic
    http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm.
    if i writting this code in UDF, i getting an error.
    If use this code:
    GlobalContainer gc = container.getGlobalContainer();
    OutputParameters paras= gc.getOutputParameters();
    paras.setString("EXPORT_PARA ", str);
    the export parameter is defined locally (in transformation step area). In integration process area parameter is equal to NULL.
    How send export parameter to Integration Process? For exapmple, i wanna send parameter to other transformation step in my integration process.
    thx.

  • Linksys WRT120N Router -- How to set to "Dynamic"?

    I am having trouble getting my work computer to connect wireless to my home router.  I was told it was because my work computer is set to "dynamic" and my home router is probably set to "static"... how to I set my home router (Linksys WRT120N) to "dynamic"?  I'm Dumb Dora when it comes to this so specific step-by-step directions would be appreciated.

    CA_Martie,
    Have you confirmed the settings on your router?
    Ensured DHCP is enabled
    Have you configured your wireless network settings on the router? 
    SSID Name
    N or G network (both?)
    Security settings?
    Can any other devices connect wirelessly?
    1 x r7000 Nighthawk 1.0.3.24
    3 x WNDR4500 v1 / v2
    e4200 Rev 1 f/w 1.0.05
    e3000 Rev 1 f/w 1.0.04
    QNAP TS-219P-II 4TB
    dns323 ext3 4TB
    Roku N 1080p
    Altigen ip-710 VOIP phone
    Other Routers - Asus (just ok), DLink (junk), Netgear (Current Favorite) & ProSafe, wrt54g & G2
    wvc54gca - Dumped this as it only support TKIP encryption & 54mbps

  • How to set up dynamic dns?

    Hi everybody,
    could anybody help me to set up Dynamic DNS in the Airport Extreme? I am using Airport Utility 5.5.3
    I also have dlink dns service active
    Thank You
    Manolo Fernández

    The following is the basic setup for DDNS on the AirPort using AirPort Utility v5x:
    AirPort Utility > Select the base station > Manual Setup >AirPort > Base Station tab > Edit ...
    Use dynamic global hostname (checked)
    Hostname: <enter your DDNS service domain here>
    User: <enter your DDNS user account name>
    Password: <enter your DDNS user account password>
    Click "Done."
    AirPort Utility > Select the base station > Manual Setup > Disks > File Sharing tab > Share disks over the Internet with Bonjour (checked)

  • How to display Entity level validation messages in a table

    I'm using ADF 11g 11.1.1.2.0. I have a page with an updateable table based on an EO. In the EO I have defined some entity level and attribute level declarative business rules. When the user enters a value in the table that violates an attribute level validation, the related message is displayed inline and the attribute is surrounded by a red box. Furthermore the user is not able to place his cursor in a different row. In this way it is clear which row and attribute caused the error. However if the user enters some data that violates an entity level validation, the validation message is displayed as global messages in the message-popup when the business rule is based on a script or a method. This means that the user gets a global message popup, and does not know which row caused the error. Ofcourse we can include the identifying attributes of the row in the error message, but I would like to know if there is another more visual way to communicate to the user which row caused the error.
    Edited by: Jonas de Graaff (PSB) on 10-feb-2010 2:51

    Hi Chittibabu,
    what about using a TreeTable control?
    SAPUI5 SDK - Demo Kit
    Regards
    Tobias

  • How to set smarthost in JES messaging 6.0

    I want to forward outbound mail to smarthost for scan virus. Please help me how to set smarthost in JES?

    It's the same as in 5.2
    imta.cnf
    look for "section II, channel block"
    find your outbound channel, usually "tcp_local"
    Add to the end of the long second line,
    daemon virus_scanner_host_name
    where "virus_scanner_host_name" is the fqdn of your machine that does the virus scanning
    after you've saved the imta.cnf file, run
    imsimta cnbuild
    imsimta restart dispatcher

  • How to set a form element value using javascript?

    Hello,
    I have been using the following two functions in AS 9.0.2 to set form values in javascript and it works correctly. However, the same code does not work in AS 10.1.2.0.2. Would appreciate if someone could let me know how to set form elements using Javascript(onchange of a field).
    function set_item_value(p_field_name, p_value)
    var v_index, v_full_name;
    for(v_index=0; v_index<document.forms[0].length; v_index++)
    v_full_name = document.forms[0].elements[v_index].name.split
    if (v_full_name[2] == p_field_name)
    document.forms[0].elements[v_index].value = p_value;
    function get_item_value(p_field_name)
    var v_index, v_full_name, v_return="";
    for(v_index=0; v_index<document.forms[0].length; v_index++)
    v_full_name = document.forms[0].elements[v_index].name.split
    if(v_full_name[2] == p_field_name)
    if(document.forms[0].elements[v_index].type != "radio")
    v_return = document.forms[0].elements[v_index].value;
    else
    if(document.forms[0].elements[v_index].checked)
    v_return = document.forms[0].elements[v_index].value;
    if(v_return == " ")
    v_return = "";
    return v_return;
    Thanks
    Dev

    This is not the best way to write JavaScript in Portal environment!
    You can't be sure that a form is the first in the html source!
    In Portal you change the order of your portlets, and also you can have several instances of the same portlet on the same page!!!
    You should use qualified form and field names!
    Please check the following JPDK methods:
    UrlUtils.htmlFormName
    HttpPortletRendererUtil.portletParameter

  • How to Set cookie in AIR with HTML/Javascript

    Can someone explain or post example code as to how I can go
    about setting a cookie in AIR using HTML and Javascript?
    I have an AIR app that requires the user to login on a form
    that lives in a non-applicationSandbox. I know how to
    create/modified/delete cookies using JS and a web browser, but the
    same code returns a cookie with a null value. I'm sure I'm just
    missing one line/word of code to make this happen.
    The stripped down basics of setting and reading a cookie
    using Javascript:
    document.cookie("myCookie = yummy");
    var taste = document.cookie;
    What am I doing wrong?

    quote:
    Originally posted by:
    anirudhs
    > So if I want to use cookies in AIR html/javascript the
    end user will need to have http access, whether it be from a public
    or private server?
    Yes.
    Though I am curious to why you are using cookies to store
    state on the client? This is AIR and you have access to the
    filesystem, local SQLite DB, encrypted local store, etc.
    Thanks for your previous answer anirudhs. Finally got a
    cookie thru Air! :P
    Some scenario's do require login via cookies for our webapps
    (in my case, chat w/ nicks which also logs users by serverside js +
    php, thereby allowing the same access method for web-browser login
    to the same chat rooms). It might be a bit of a stretch for some of
    us to attempt to code filesystem/SQlite/localStore updater for our
    web-users via js + php, although I know we could perhaps embed a
    hidden flash to do the localStore, and pass data back and forth
    from js, but that's lot of extra lifting, whereas browser cookies
    are naturally designed for such logins.
    I'm confused by the safari wording thou.. does the webkit
    security model in Air only work via user activated http (ie.
    clicking links), or is there some way Air can initiate an http
    connection (say using loader) to set or get cookies? It seems a
    pain to need to force the Air user to click and open a dead link
    just to activate a cookie session, even if it's only to a hidden
    frame.

  • How to set iPhone so Mail messages in inbox disappear after being downloaded to Mail on my MacBook Pro

    Hi -
    Previously, the Mail settings on my iPhone and MacBook Pro were set exactly as I wanted them to be: If I opened a Mail message on my phone, it stayed in the inbox only until I opened the Mail App on my MacBook Pro, at which time it downloaded onto the notebook and disappeared from the iPhone.  This is how I want it, as I have no need for duplicate emails in multiple locations.
    I recently had to reformat the hard drive on the MascBook Pro and reinstall all the software and data.  Unfortunately, I was not able to save the Mail preferences, and now my Mail App works differently: Mail messages remain on both the iPhone and the Mac, and if I delete a message on one device it also disappears from the other.
    Can anyone help me to figure out how to get the settings and preferences back to the way they were originally?  Thanks for any information anyone can provide.
    Shelly

    Are you using Mac Mail - the icon that looks like a stamp?
    If yes, you can create Mailboxes. (click on Mailbox in the menu bar and select New Mailbox...) These are folders and are visible in Mail.
    You store the mail you wish to archive in appropriate folders.

Maybe you are looking for