Using Right {field, 5} in string search

Hello,
I have an array with the following data  xyz5 = 'US 10411', 'US 10421', 'US 10431', 'US 10441'
The SN field is 5 character length with data such as 10411, 10421 10441 etc..
How do I search for the last 5 digits of each of the data in the array?
myaop6report.RecordSelectionFormula = "{aop5.SN}in right {[" & xyz5 & "],5}"
Thankls,
Victor

Hi Victor,
To search for the SN database field in the array, you can create a Record Selection Formula like:
       (" " + + ",") in (Join(YourArray,",")+",")
Where should be replaced by your database fields that contains the SN number, and where YourArray is your array.
The formula convert the array in a string seperated by commas.
Then add a comma to your database field as well as a space in front. Finally it compare the SN fields to the long string.
So for example if the database fields SN contains 10431, then the value we will search is: 
10431,
The array will now be a long string like:
US 10411, US 10421, US 10431, US 10441,
And it will look for the value 10431, in the string.
The comma at the end and the space at the beginning it's to ensure it doesn't find any values that may exist within another one. It shouldn't be an issue in your case since it is always going to be equal to 5 characters for the SN value, but just in case it doesn't, we do not want to return 1043133 when we are searching for only 10431.
Regards,
Patrick

Similar Messages

  • Problem in String Search using OKAPI in 9i Lite

    We are creating an Symbian EPOC application using Oracle 9iLite in stand-alone mode. We have managed to create a C++ program that creates an Oracle database on the Nokia Communicator 9210.
    The problem is that a string search returns either null or all of the searched records, ie. it does not work.
    The code below should do the string search and return the strings that match the given keyword. Any idea why this is not working? We are using OKAPI.
    TempCond[0].Operator = OK_GT;
    TempCond[0].AttrPos = KEYWORDREFERENCE_INDEX_FOR_KEYWORD;
    TempCond[0].AttrVal.BufPtr = (unsigned char*) szGivenKeyword;
    TempCond[0].AttrVal.BufSize = OK_NEW_ARRAY | strlen szGivenKeyword);
    TempCond[0].AttrVal.Indicator=1;
    TempCond[0].Collate=0;
    TempCond[0].Connective=OK_AND;
    // Iterate through the entire group, extracting the key data
    //(whatever the key may be) and the object reference, and
    // append to the end of the array.
    e = okCreateIterator( iEnv,
    iEbmgKeywordReferenceGroupRef,
    iEbmgKeywordReferenceClassRef,
    FALSE,
    1,
    TempCond,
    20,
    0,
    NULL,
    &iter
    Thanks for any help you may provide.

    I am sorry, this is not an answer to your question but a little help from you is well appeciated.
    I have just started exploring oracle 9i Lite to develop apps. on Palm and WinCE using OKAPI but the documentation does not seem enough. Is there some book or sample programs available that demonstrate OKAPI to develop form based apps ? CodeWarrior and Satellite Forms are not good when someone wants to try writing demp app.
    Thanks,
    Ashish

  • Number database field treated as String in formula when using 64bit runtime

    Hey just a quick shout out to those with the above problem or those following the now "closed but unanswered" thread by the same name - if you're getting "A string is required here" error messages after switching over to the 64-bit runtime, or other weird loss of formatting issues, then try turning off the "Verify on First Refresh" or "Verify Stored Procedures on First Refresh" options in File | Report Options... as the case may be.

    Previous post was here.
    Number database field treated as String in formula when using 64bit runtime
    Thanks for the find ezachman.

  • Can the MTM Test Run 'build number' field be unhooked from a real build without using a fake or empty string.

    I'm working on integrating MTM Test Runs (Via TFS/MTM API) with our automated build & test system, and I've noticed that if I supply a valid build number when creating a test run, and I later delete the build, the test run data disappears with it.
    I know that I can deselect 'Test Results' in the Delete Build dialog, and in the Retention Policy for the Build Definition, but in the interest of avoiding any confusion or mistakes (we have a lot of build definitions to maintain), I wonder if it would be
    possible to instruct the test run to prevent a deliberate link.
    While we're on the subject, if anyone could explain the benefits or potential uses this link might provide (even under conditions that may not meet our usage) I would be very grateful.

    We don't use MTM to run tests, we have another system that works better with our test environments. We will be using MTM to track pass/fail data for the tests that have run, by creating test case workitems for them and using test run and test result objects
    to store the data.
    Going back to my question, I'm looking for a way to prevent a test run object from linking to a TFS Build so I can prevent TFS from removing the test run when I delete it. We have a lot of builds and we frequently remove old ones, I need a way to retain
    historical data for test runs.
    I understand that under normal circumstances, the build number would first be used to retrieve the bits from the build to test with, but since we're not using that system, I'd like to know more about how it might be used in other ways - for example, for
    querying or associating work items. We're considering not using this field, or modifying it in such a way that it doesn't create the relationship with a build that I mentioned, and I would like to know what functionality we would lose by doing this.

  • How to filter Groupwise records using custom fields?

    I am consuming the Groupwise web service and want to search
    the appointments based on value provided for a custom field. All
    the other searches (date, subject, message) are working fine. The
    only thing that does not work is search on the custom field. If I
    search on the Custom field the service returns all records.
    Following is the excerpt of the code. CFGWID is the field
    that is sent to groupwise with an application generated value. I am
    able to query the field but cannot filter appointments using the
    CFGWID field.
    <filter>
    <elements type="FilterGroup">
    <element type="FilterEntry">
    <op xsi:type="xsd:string">eq</op>
    <custom xsi:type="xsd:custom">cfgwid</custom>
    <value
    xsi:type="xsd:string">#arguments.AppMsgID#</value>
    </element>
    </elements>
    </filter>
    At this time there is only one entry in this filter. Any
    ideas?

    PS0510 wrote:
    > I am consuming the Groupwise web service
    First of all, "Groupwise web service"!? Please tell me more
    about this.
    I use Groupwise here and this sounds like an interesting
    feature!
    > and want to search the appointments based on value
    provided for a custom field.
    How are you searching the custom field? Are you accounting
    for the name
    space xsi: and xsd: values? There is a bit of quirkiness with
    CFML xml
    functionality when working with name spaces. I've always been
    able to
    work out these issues with a bit of Google searching.

  • String search

    i hI have a string "1234, abcdef, bbbbb"
    How do one get/search for the "abcdef" or "bbbb" out of the string using substring?
    If anyone has source code or references (for similar code) searching for "abcdef�(normally text enter in a text field that will be used to search through a string) It would be appreciated

    // This might help!
    String search = "test";
    Pattern pattern = Pattern.compile(".*" +search +".*");
    boolean test = pattern.matcher(testString).matches();

  • Storing a xml excel file in a field of type string in a transparent table

    Hello Experts,
    I have a program to maintain. There is a transparent table which stores a XML excel file. I have used where used list option to find out if there is an existing program which used that table but couldnt find one.
    In debugger mode, when I view the contents of the field, i can see list of characters, when i choose the option of viewing in xml browser, it opens me the excel file.
    My requirement is to make a simple change to the excel file and store it back to the table in the same format it is.
    Can someone explain to me, how to convert that xml excel file into string so that it is stored in a field of type string.
    Thanks Nitish.

    You can use the parser method provided in CL_XML_DOCUMENT class. Search for this particular class in the forums, you'll find many relevant post.
    BR,
    Suhas

  • How do I use the event.target.name String with an external dispatchEvent?

    ...I hope the title question makes sense...
    On my stage I have an externally loaded SWF with a button. When clicked the button dispatches an event to the main stage.
    On the main stage a listener then loads an SWF into a loader called gallery.
    The gallery loader is also being shared by buttons on the main stage which use the event.target.name String to call in SWFs with corresponding names.
    I am using Tweens to fade-out and -in content to the gallery when a button is pressed.
    Loading the SWFs was working until I tried to create a universal button function for the dispatchEvent buttons...
    The problem I have is that I don't know how to define the String to tell the newSWFRequest where to find the SWF when triggered by the external buttons.
    (I may be doing this all wrong... but figured the best way to load an SWF on to the main stage from an external SWF was by using dispatchEvent??)
    My code triggers the Event and the gallery loader fades out, but then it cannot find the new SWF:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    Please can someone help me understand the way to make the String point in the right direction? (I think the only errors are in bold below)
    Code:
    var myTweenIn2:Tween;
    var myTweenOut2:Tween;
    var nextLoadS2:String;
    // Listen for external event dispatched from external btns
    addEventListener("contactStage", btnClickExtrnl);
    function btnClickExtrnl(e:Event):void {
    nextLoadS2 = ?????
    myTweenOut2=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
    myTweenOut2.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
    // Btns Universal function
    function tweenOutCompleteF2(e:TweenEvent){
    myTweenOut2.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
    myTweenOut2=null;
        var newSWFRequest:URLRequest = new URLRequest("swfs/" + nextLoadS2 + ".swf");
    myTweenIn2 = new Tween(gallery, "alpha", None.easeOut, gallery.alpha, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    Thank you.

    That works – thank you!
    I'm now using this code to fade in each of the SWFs:
    function contactStage(e:MouseEvent):void {
        var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
        myTweenIn = new Tween(gallery,  "alpha", None.easeOut, 0, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    But I cannot add the fade out function. I have amended the above code to create:
    var myTweenOutX:Tween;
    var myTweenInX:Tween;
    function contactStage(e:MouseEvent):void {
    myTweenOutX=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
    myTweenOutX.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
    function tweenOutCompleteFX(e:TweenEvent){
    myTweenOutX.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
    myTweenOutX=null;
        var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
    myTweenInX = new Tween(gallery,  "alpha", None.easeOut, 0, 1, 0.2, true);
        gallery.load(newSWFRequest);
        gallery.x = Xpos;
        gallery.y = Ypos;
    But get this error:
    ReferenceError: Error #1069: Property name not found on fl.transitions.Tween and there is no default value.
    at ACOUSTIC_fla::MainTimeline/tweenOutCompleteFX()[ACOUSTIC_fla.MainTimeline::frame1:110]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at fl.transitions::Tween/set time()
    at fl.transitions::Tween/nextFrame()
    at fl.transitions::Tween/onEnterFrame()
    Where am I going wrong?

  • Report using Parameter Field

    Hi,
    I have designed one report using Parameter Field which is Cost Code (string).
    When I run my report, I ask to enter cost code. When I enter cost code 30, I get report for all transaction of cost code 30 and 300.
    How could I avoid this problem.
    Thanks
    Mithani

    Try with this
    {Project_cost.EXPENSES_Code} IN {?Cost Code}
    and also
    Check the query formed after giving the input parameter. Goto Database --> Show Sql Query.

  • Here's how to find the right word in a string

    I needed to find the rightmost word in a string. I didn't find a simple formula in these forums, but I now have one, so I wanted to share it. Hope you find it useful.
    Assuming that the string is in cell A1, the following will return the rightmost word in the string:
    RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1," ","*",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))

    I found the problem. Whatever character was being used in the substitution was parsed out by the forum parser. I replaced it with "œ" (option q on my keyboard).
    =RIGHT(A1,LEN(A1)-FIND("œ",SUBSTITUTE(A1," ","œ",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))
    Still needs an error check for a single-word "sentence" and to remove the trailing period but it does seem to work. Pretty slick.
    Message was edited by: Badunit
    I see below that the problem was fixed by the OP.
    Message was edited by: Badunit

  • Security using custom field in PCUI

    We would like to create a custom field on the header of the business partner to store information that would then be used in the security roles.
    For example, we want to create a branch field on the header of the business partner and then use this field to restrict access to specific accounts within the sytem using a CRM Security role.
    Does anyone know if you can use a custom field in the CRM system to restrict security within the PCUI application?
    If anyone has any information, I would greatly appreciate it as we are on a crunch to get this implemented!
    Thanks!

    Hi Darcie,
    If you add custom field and maintain value in it, i'm not sure if you can restrict access by CRM Security role.
    If your users are going to be entirely based only on portal/pcui (i.e. they would not use SAP-GUI log-in) then you can consider the option of tweaking your Accounts advanced search and not letting users see certain accounts (based on the value in EEWB / custom field)
    Hope this helps.
    Regards,
    Raviraj

  • CRM  IC Winclient - How to add new fields in the BP Search of TRX CIC0

    Hello Experts,
    I want to know how to add new fields in the BP Search of TRX CIC0. In the HTML that we're using here I need to add the URL of the BP.
    Can you help me?
    Thanks in advance.
    Caíque Escaler

    Hi
    make append to tables in se11 - CCMBP1FIELDS, CCMBP2FIELDS
    in spro in Define customer-specific search control -> mark fields with X.
    and enhance html template CRM_CIC_SEARCH_DISPLAY. -> tcode smw0, look for package CRM_CIC_COMPONENTS for html CRM_CIC_SEARCH_DISPLAY. export it from SAP, edit, and import.
    you will need to enhance function module used for searching - you will find him in spro in Search Strategies.
    Regards
    Radek

  • Problems using right click to open in new Tab or Window. Will not work. How do you solve this. Have v5.0 installed.

    I have the latest version of Firefox installed. Version 5.0.
    When searching on Google and use right-click to open in new tab or window. Keep getting blank tab.
    Can somebody advise how to solve this.
    Thank you.

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the ''Safe mode'' start window.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • CSV output (export to excel) don't use right code table

    CSV output (export to excel) don't use right code table. We use code table
    8859-2 (reports and forms are OK). Why export to excel don't use this code table.
    Thanks for answers

    You could also take the example from my blob that Denes mentioned and instrument it to output in either CSV or HTML. This way, you could have a single procedure that worked for both formats.
    All you would need to do is handle each field differently - pad a TD and /TD (with proper brackets, of course) if its HTML or just append a comma if it's CSV.
    Thanks,
    &#150; Scott &#150;
    http://spendolini.blogspot.com/
    http://sumnertech.com/

  • Using Special Fields in Formula's

    Hello,
    I'm trying to use a Crystal "Special Field" to filter data in my report. Specifically, I want to use the "Current CE User Name" field to achieve row-level security. Does anyone know how to use these fields in parameters or filters?
    Regards,
    Gilbert

    You can use the special field CUrrentCEUserName like this
    If (IsNumeric(Right(CUrrentCEUserName,3))) then
       ToNumber(Right(CUrrentCEUserName,3)) = {dbvalue}
    else
       ToNumber(Right(CUrrentCEUserName,2)) = {dbvalue}

Maybe you are looking for

  • Access 2013 64-bit Treeview Alternative

    I have a code snippets application that I wrote in Access and recently migrated to 64-bit version of Office 2013. In addition to the Snippets being searchable, I also had them organized in a hierarchy (i.e., treeview) for browsing.  With expandable n

  • Transaction code to debugg smartforms

    transaction code to debugg smartforms ? plz tell me

  • Re: 6/10/14 - Release - Flash Player 14

    Hello Chris Campell, my W8.1 is uptodate June 12., only two optional updates (bing+silverlight) would be available, but active_x produces an error 1722 and does not install. Will there be a patch from MS or an update of Flash Player 14? Thanks in adv

  • [SOLVED] vbam-gtk depends on sfml, but pacman can't find it, 404 error

    So I'm trying to install vbam-gtk, the package for visualboyadvance, which is available to pacman directly. It's not an AUR package, nor are any of it's dependencies according to it's package page. But when I run sudo pacman -S vbam-gtk , it spits ou

  • Payroll(usa)

    Hi, guru's i run the usa pay roll, but i couldn't see pay slip. forms option not appear in that. in the simulation screen i need to enter varriant in the log option, how i can enter the varriant in that plz ex... regards, bala