Normal Topic Vendor# Reference in Source List (Read 393 times)
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Vendor# Reference in Source List
Mar 2nd, 2006 at 1:52pm
Print Post Print Post  
I have a field programmed in Vendor Name on element entry and populates with a list as follows:

var vList as String 
     
vList = @XLookupSourceListAll(@FN, "..", "VENDORS!VENDOR NAME", "VENDOR NAME;REFERENCE;VENDOR#") 
vList = @Replace(vList, ";", " - ")          // replaces ;separated values with a " -  "
vList = @Replace(vList, @Newline(), ";")          // inserts newline in list
vList = @SortStringArray(vList, 0)                //0 = ASCII sort, 1 = Number sort   
PopulateListElement(VENDOR NAME, vList)   

I recently added Vendor# to the list so that I could strip out the number into the Vendor# fields (we have some vendors where payments go to different locations and therefore unique vendor records).

It works fine but my problem is that Vendor# (number type field) appears at the end of the source list as follows with 6 decimal places:  ie.  230.000000.

Is there a way to eliminate the decimal and zero's other than changing the field to a text field ?

When I strip out the Vendor# (on vendor Name element change), I used 10 places to the right of Vendor Name, so it shows correctly as 230

Thanks,

Louis



  

Louis Galvao
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Vendor# Reference in Source List
Reply #1 - Mar 2nd, 2006 at 2:00pm
Print Post Print Post  
Have you tried the brute force approach?
Code
Select All
vList = @Replace(vList, ".000000", "")
 

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Vendor# Reference in Source List
Reply #2 - Mar 2nd, 2006 at 2:36pm
Print Post Print Post  
Erika:

That was too easy ! and it works great.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged