Need Help with Record Selection Formula
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Need Help with Record Selection Formula

  1. #1
    Join Date
    May 2009
    Posts
    4

    Unhappy Need Help with Record Selection Formula

    Hello Everyone,

    I am trying to create a record selection formula which loops through all the selected values in the parameter list and checks whether the parameter values starts with "P-" string.

    But, it seems the record selection does not support for loop.

    //Not Working with for loop

    NumberVar Limit := UBound({?Enter Vendor});
    Numbervar Indx ;

    For Indx := 1 To Limit Do
    (
    local StringVar Txt := ToText({?Enter Vendor}[Indx]);
    if Txt startswith "P-" Then Txt := Mid (Txt, 3) ;
    {vendor.name} = Txt
    );

    //Working if I select a particular parameter value

    if {?Enter Vendor}[1] startswith "P-" Then {vendor.name} = Mid ({?Enter Vendor}[1], 3)


    Not sure how to check the string against all selected parameter values. Your help will be greatly appreciated. Thanks a million in advance.

  2. #2
    Join Date
    Jul 2005
    Posts
    1,074

    Re: Need Help with Record Selection Formula

    Never tried but :
    Code:
    if {?Enter Vendor}[1] startswith "P-" Then {vendor.name} = Mid ({?Enter Vendor}[1], 3) Else
    if {?Enter Vendor}[2] startswith "P-" Then {vendor.name} = Mid ({?Enter Vendor}[2], 3)
    and so on...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center