How to use built-in functions with Record set values?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chandhseke
    New Member
    • Jun 2009
    • 92

    How to use built-in functions with Record set values?

    Hi Folks,
    In my code i need to preceed every amount value with a currency sign selected by a user. The drop down contains a list of currency values like USD(US Dollars), EUR(Euro), INR(Indian Rupee) etc.

    When we review the data entered by the users, the currency value should be preceeded with currency sign selected by the user in above drop down list. For Example
    : If a user select USD(US Dollars) from the list then a Rate in another column as 10000. The view should look like USD 10000. I pull data to my form using Record Sets so how can is use LEFT(String, length) with a record set to trim first 3 characters of values selected by a user from drop down list. Please advise.
    Code:
    <td nowrap><div align="left">Currency Used For Pricing:</div></td>
              <td nowrap class="highlight"> <div align="left"><%=Rs1("currency_type")%></div></td>
            </tr>

    Code:
    <tr>
     <td><div align="left">Current Year Rate:</div></td>
              <td class="highlight"> <div align="left">$<%=Rs1("RATE1")%></div></td>
            </tr>


    Regards,
    Chandhseke
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Rs1("currency_t ype") returns a string, so you can put this whole expression in the LEFT() function:
    Code:
    LEFT(RS1("curreny_type"), 3)
    Does this answer your question?

    Jared

    Comment

    • chandhseke
      New Member
      • Jun 2009
      • 92

      #3
      Hi Jared,
      That answers my question. I have a query which is related to my above question should i open a new thread for that please advise.

      Regards,
      Chandhseke

      Comment

      Working...