Validate Text Box value for ending spaces entered in a Custom 2010 InfoPath SharePoint 2010 form

I have Custom InfoPath form for added and editing items into a SharePoint 2010 list.  For one of the fields I want to perform some data validation to make sure they did not add any spaces at the beginning or ending of the value they entered. 
I have tried entering the pattern of "^\S(.*\S)?$" and it did not seem to work.  Does anyone have any pattern that I would be able to use to check and see if the value entered in the text box contains any leading or trailing spaces
or a better solution for determining if there are leading or trailing spaces?

You can just use the normalize-space() function.
So for example for the Title field on a list go into InfoPath and change the Default Value of that text box to, "normalize-space(Title)" without the quotes

Similar Messages

  • Set default value for people picker only when user checks a checkbox (Sharepoint 2010)

    The javescript in below link works for me.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/2b130f64-3db2-484a-9a53-ccbe18d2c5de/set-default-value-for-people-picker-in-list-template-current-user?forum=sharepointgenerallegacy
    However, I'd like to set default user for people picker only when user checks a checkbox. 
    I am new to  development. Could you please help me on this requirement ?
    Thank you very much. 

    Hello,
    Use this link to to validate checkbox value, if true then set the person or group value (i.e. as posted in your link).
    http://geekswithblogs.net/haniamr/archive/2011/03/10/validate-that-a-checkbox-is-checked-using-javascript.aspx
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Error while changing the PO BOX value for a Business partner

    Hi Friends,
    We are getting an error when we try to change the PO Box value for a Business Partner.
    We have the dependency like when we give the value for the PO Box we also need to give the postal code value. And also we have a specific format for the Postal code. We gave both the values (a valid postal code) and try to save the details, then error message "The attribute GUID of Organization (a Contact Person is assigned to) of the Business Object contact person is not valid" is displayed. We have no clue why there is a conflict for the contact person details.
    Can any one suggest the reason for this?
    Thanks & regards,
    Swarna Seeta

    Hi Swarna,
    You are getting this message not because you have entered wrong Post code .It will come even if you try to change some other field and save it. This is because on saving a business object, the framework tries to validate all the associated objects depending on the relation.In this case the data in the mobile client is either not present or is no longer valid.
    Check if the field of the Business object which is being shown as invalid, has some data in the table. Check the combo associated to it and from where the combo is doing the validation. The table from where the combo is doing the validation does not have that data and so the value is invalid.
    Also compare the number of entries in smokna1sht table in ides and in CDB.
    Regards
    Vivek

  • How to compare text box value with the table data??

    Hello ALL,
    I created one stored procedure in DB,it is as follows:-
    CREATE or replace PROCEDURE chkUser
    u in varchar2,
    p in varchar2,
    ap out varchar2
    is
    begin
    select count(*) into ap from tbuser where loginid = u and password = p;
    end;
    And at the front end I have designed a form with 2 text boxes, now my question is I wanna compare these text box values(which user enters) with the data of the table....??? something like control (may be I am not sure)..... ???
    If anybody can help me out with this issue...... help will be appreciated
    Thank you.
    regards,
    Kumar

    hi Elise,
    I'm always getting the Error Message as "Invalid Creditianls"... let me tell you the whole scenario with sql synatx.
    I have created tables as:-
    CREATE TABLE "TBUSER"
    (     "LOGINID" VARCHAR2(30) NOT NULL ENABLE,
         "PASSWORD" VARCHAR2(30),
         CONSTRAINT "TBUSER_PK" PRIMARY KEY ("LOGINID") ENABLE
    than I created the Procedure on tbuser, it is as:-
    create or replace PROCEDURE logincheck
    u in varchar2,
    p in varchar2,
    ap out varchar2
    is
    begin
    select count(*) into ap from tbuser where loginid = u and password = p;
    end;
    now at the front end side I have created one form with 2 text boxes (P8_USERNAME & P8_PASSWORD) and 2 buttons (Cancel and Submit)
    as per you told me in the above post, I have created 'Validation' procedure with Type as 'Exists' and expression(into Validation Expression1)as:-
    select 1 from tbuser
    where loginid = :P8_USERNAME
    and password = :P8_PASSWORD;
    and
    kept an error message as 'Invalid credentials'.....
    but I don't know what's going wrong..... I do have few data into the table, and when I am entering the same data(with case sensitive) I am getting the Error message, rather than when the credentials are perfect user should be allowed to enter into the current page(where I have created this form and validation procedure)....
    any idea what's going worng and where...????
    thxs.... appreciated..
    regards,
    Kumar

  • Compare two text box values????

    Hello All,
    I do have one logic, but not sure where to write it so want your guys help for the same.
    The logic is:-
    if (&P13_NEW_PASSWORD. == &P13_CONFIRM_NEW_PASSWORD.) then
    insert into tbuser (password) values (&P13_NEW_PASSWORD.);
    else
    dbms_output.line_('Both the text boxes should be same!!')
    P13_NEW_PASSWORD and P13_CONFIRM_NEW_PASSWORD are two text boxes, where in above statment I'm comparing two text box values, if yes than insert that values into the DB tables otherwise displaying else messges.
    so can anybody tell me where should i write the above logic to make it work perfect..!!!
    thanks
    regards,
    Kumar

    Kumar,
    I'm glad you asked! Here's a great blog post on a custom auth scheme that hashes passwords:
    http://djmein.blogspot.com/2007/07/custom-authentication-authorisation.html
    I would suggest a few changes to the "get_hash" function. First, the DBMS_OBFUSCATION_TOOLKIT has been deprecated in favor of DBMS_CRYPTO:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_crypto.htm
    http://www.psoug.org/reference/dbms_crypto.html
    DBMS_CRYPTO offers Message Authentication Code (MAC) functions which are keyed hashes. If you use a non-keyed function such as MD5 (which is VERY well known), someone can easily generate a table of all possible passwords within reason and their matching hash, which essentially allows them to get the passwords. MAC functions take in the data (password in this case) and a key. You can probably just use a big random string for your key. Now someone would need to the key as well to generate a hash table. In short, just use DBMS_CRYPTO.MAC where Duncan used DBMS_OBFUSCATION_TOOLKIT.md5.
    Tyler

  • No show-up of a dialogue box again for me to enter S/N of Acrobat 9 Pro;and pic distort in Photoshop

    I have two problems:
    1. The Acrobat 9 Pro is a separate DVD and I did again just insert this DVD. Still no dialogue box appears for me to enter the serial number (even though I have got the
        serial number) for installing. I fail to install Acrobat 9 Pro;
    2. Another problem is that what ever picture I open in PhotoShop, the picture is fragmented and distorted (as shown in the attachment of my previous email).
    Your advice, please.
    Shu Tak YU

    Shu Tak Yu this is a duplicate of your inquiry you made at http://forums.adobe.com/message/4105937#4105937.

  • Text Box Value in the Query Bind Parameter

    Hi
    I have to use text box value in the query bind parameter
    Thanks to help...

    Hi,
    - drag Execute with params
    - use EL
    Frank

  • I purchased a download version of Lightroom 6 from Amazon  and when i write the license key number i'm getting this message " We are unable to validate this serial number for adobe Lightroom. Please contact Customer Support. "

    I purchased a download version of Lightroom 6 from Amazon  and when i write the license key number i'm getting this message " We are unable to validate this serial number for adobe Lightroom. Please contact Customer Support. "

    contact adobe support by clicking this link and then clicking 'still need help' as soon as it appears, https://helpx.adobe.com/contact.html

  • We are unable to validate this serial number for product name .  Please contact Customer Support

    We are unable to validate this serial number for <product name>.  Please contact Customer Support
    Can I get my program validated?

    Error "The serial number is not valid for this product" | Creative Suite

  • Button to call pl/sql stored proc using text box value as parameter

    I need to create a portal page with an input text box and a button (or a clickable pl/sql item). A user will enter a value in the text box and click the button, a stored pl/sql procedure will be executed that takes the value of the text box as an input parameter. The procedure output (basically a success or an error message) must be printed in a new window which the user can close after checking the output. No redirection to another page is required.
    I have no experience in developing portal pages and would appreciate if you point me in a right direction. Do I need to create an html form and obtain the value of the text box via p_session object? In this case what do I need to specify as ACTION for the form - the same page URL? Where should I place the call to the stored procedure? Or can I somehow use a pl/sql item?
    Thank you for your help

    Hi Arnaud
    Thank you for the reply. Could you please give me dome more details. I have created a procedure:
    create or replace procedure grant_roles (p_username varchar2) as
    begin
    <code>
    htp.p('Grant succeeded for username is '||p_username);
    exceptions when others then
    htp.p('Grant failed. '||v_err_msg);
    end;
    and an html portlet:
    <html>
    <body>
    <form name="input" action="/pls/portal/pls/portal_public.grant_roles_test?p_username=anna" method="get">
    <input type="text" name="t_username" size="20">
    <br>
    <input type="submit" value="Grant">
    </form>
    </body>
    </html>
    Obviously this is not the right way to call my procedure as it does not work. And of course I want to pass the value of the t_username text box to the procedure not the string "anna". I am also not sure where a procedure prints its output. Is it possible to open a new window to display the output?
    Thank you for your help,
    Anna

  • Does anyone know if there is a text box generator for InDesign

    Is there a text box generator in InDesign that will allow you to create a text box with XXX amount of words in it? I work for a newspaper pagination desk and we always get asked to keep a hole for a story that may have 500 words in it. If there is such a thing this would be greatly helpful for people in my position to use this and implement it in the whole office so that we could plug in a space and keep a rough idea as to how much space we need.
    Thanks in advance for your help
    Paul D

    PaulDonegan wrote:
    Is there a text box generator in InDesign that will allow you to create a text box with XXX amount of words in it? I work for a newspaper pagination desk and we always get asked to keep a hole for a story that may have 500 words in it. If there is such a thing this would be greatly helpful for people in my position to use this and implement it in the whole office so that we could plug in a space and keep a rough idea as to how much space we need.
    Thanks in advance for your help
    Paul D
    Use Type > Fill with Placeholder Text to generate lots of text. Select some text, then use Window > Info to display the number of selected words. Expand or contract the selection by holding Shift, or Shift+Cmd/Ctrl, and pressing arrow keys. When you have the number of words you want, copy, press Escape, click an empty spot on a page, then paste; the copied text appears in is own text frame. Select the frame and use Object > Fitting > Fit Frame to Content contain all the text within the frame.
    Search Google for terms like "InDesign placeholder text" without quotes for info on changing the actual placeholder text, and also info on a text generator.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Profile values for specifically if  enter section name and product name

    I have tried to get Profile values with the following query,
    SELECT *
    FROM fnd_profile_options_vl po,
    fnd_profile_option_values pov,
    fnd_user usr,
    fnd_application app,
    fnd_responsibility rsp,
    fnd_nodes svr,
    hr_operating_units org
    WHERE 1 = 1
    AND pov.application_id = po.application_id
    AND pov.profile_option_id = po.profile_option_id
    AND usr.user_id(+) = pov.level_value
    AND rsp.application_id(+) = pov.level_value_application_id
    AND rsp.responsibility_id(+) = pov.level_value
    AND app.application_id(+) = pov.level_value
    AND svr.node_id(+) = pov.level_value
    AND org.organization_id(+) = pov.level_value
    Suppose I need to populate the profile values for specifically if I enter section name and product name.
    How can I do that ???

    Hussein Sawwan wrote:
    Thanks, I have gone through the documentation,I can get all profile values.But how can I get the profile values and names that is related to/affects a particular product.
    Is there any connection between products/items with profile option.No. However, you may run the same queries using the follows:
    For example ..
    For GL --> PROFILE_OPTION_NAME like '%GL%'
    For AR --> PROFILE_OPTION_NAME like '%AR%'
    And so on.
    Please note that the above will not return all profile options that affect (or related to) specific module.
    You can also get the list of profile option which are set at the Application/Responsibility level.
    Thanks,
    Hussein
    >
    Thanks, I have gone through the documentation,I can get all profile values.But how can I get the profile values and names that is related to/affects a particular product.
    Is there any connection between products/items with profile option.No. However, you may run the same queries using the follows:
    For example ..
    For GL --> PROFILE_OPTION_NAME like '%GL%'
    For AR --> PROFILE_OPTION_NAME like '%AR%'
    And so on.
    Please note that the above will not return all profile options that affect (or related to) specific module.
    You can also get the list of profile option which are set at the Application/Responsibility level.
    Thanks,
    Hussein
    Hussein ,
    Can I use following query to retrieve the profile values for an item with m.msite_id  =10218 AND s.section_id    =10591 and i.organization_id = 204 and i.inventory_item_id =66567
    select distinct *
    FROM fnd_profile_options_vl po,
    fnd_profile_option_values pov,
    fnd_user usr,
    fnd_application app,
    fnd_responsibility rsp,
    fnd_nodes svr,
    hr_operating_units org,
    ibe_msites_tl m,
    ibe_dsp_sections_tl s,
    mtl_system_items_b i
    where
    pov.application_id = po.application_id
    AND pov.profile_option_id = po.profile_option_id
    AND usr.user_id(+) = pov.level_value
    AND rsp.application_id(+) = pov.level_value_application_id
    AND rsp.responsibility_id(+) = pov.level_value
    AND app.application_id(+) = pov.level_value
    AND svr.node_id(+) = pov.level_value
    AND org.organization_id(+) = pov.level_value
    and m.msite_id =10218
    AND s.section_id =10591
    and i.organization_id = 204
    and i.inventory_item_id =66567
    Anything wrong here???
    Thanks

  • Set a text box value based on the LOV value

    Hi,
    I have an LOV that lists customer part numbers. When a user selects a customer part number from the LOV, I need to update the part quantity from a different table in a text box.
    I am not sure how to get this to work. If somebody can help me get this working, I would really appreciate it.
    Thank you
    Bhavesh

    look at http://forums.oracle.com/forums/message.jsp?id=936631&gid=469632
    likely they got the same problem.
    Hi,
    I have an LOV that lists customer part numbers. When a user selects a customer part number from the LOV, I need to update the part quantity from a different table in a text box.
    I am not sure how to get this to work. If somebody can help me get this working, I would really appreciate it.
    Thank you
    Bhavesh

  • Rich Text Editor functionality for a DIV tag in a publishing page in SharePoint online

    Hi,
    We are having a requirement where we need RTE behavior of SharePoint 2013 Rich Html Field for a custom DIV. The scenario goes like this:
    1. I have a publishing page
    2. I dropped the content editor web part and to that content editor web part I will point to an HTML file that needs to be rendered in that content editor web part
    3. I have one DIV in the above mentioned HTML files and I want that div to be editable and I need to RTE options for that DIV.
    How to accomplish the above behavior?

    Hi,
    According to your post, my understanding is that you wanted to create html rich text editor for a DIV tag in a publishing page in SharePoint online.
    You can create your own Rich Text Editor.
    Here are some great blogs for your reference:
    An Example to Use HTML Rich Text Editor
    Example: Using the Editor's instance
    Rich Text Editor control in SharePoint 2010
    Regarding SharePoint Online, for quick and accurate answers to your questions, it is recommended that you initial a new thread in Office 365 forum.
    Office 365 forum
    http://community.office365.com/en-us/forums/default.aspx
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to print calendar for the year with one month a page in sharepoint 2010?

    Currently, I can print a SharePoint 2010 calendar one page at time when the month view is displayed.  Is there an easy way to print all the months at once with one month on each page?
    Thanks for any tips!

    I can't vouch for it but a useful looking CodePlex project might help with this.
    If you've permissions to install it and test, have a look at this. It does mention Calendars specifically too.
    http://spprintribbonbutton.codeplex.com/
    I'd be interested in your feedback for this one.
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

Maybe you are looking for

  • How to write a module pool (M) program for the DEMO_DYNPRO_TABSTRIP_server

    Hi, How does someone write a module pool program (type m ) like the one which is given as an example for tabstrip control (paging through the app.server which is a report program). Please check the code given in the abap tutorial by sap below. REPORT

  • I can't remember my administrator password!

    I try to install Maverick, but my old MacBook pro ask me for an administrator password. Can´t remember i have made a password called that. Can anyone help me?

  • Moving answers in a quiz once they have been matched to a target in using drag and drop

    Hi, I am having a problem with some of my drag and drop quizzes that I'm wondering if anyone you might be able to help me with? In some drag and drop quizzes I have created, using the Infosemantics drag and drop light widget in Captivate 5.5, I can m

  • Quicktime not an option on Sequence settings Video preview

    In the sequence settings, under video preview, "Quicktime" is not listed as a Preview File Format. Running Windows 8.1, 64bit I have installed the latest Quicktime, uninstalled it, reinstalled it, repaired it, to no avail. Also I have done the same w

  • How did my site get hacked?

    Earlier this week, 7 sites on 3 different servers (Go-daddy, Lunar Pages, and another ) were allegedly hacked and blocked in Firefox, Chrome and Google search results. I use iObit and advanced system care to keep my pc clean. My pc, as scanned by the