Split function

Split a string into an array of string

Parameters:
PPSTR: The complete string to split
PDELIMITER: The string defined as content separator / delimiter of the string
XXTMP: The array that will contains the separated strings

Returned value: Number of separated elements

Funprog F_SPLIT(PPSTR,PDELIMITER,XXTMP) 
Value Char PPSTR 
Value Char PDELIMITER 
Variable Char XXTMP 

    Local Integer XCONTA 
    Local Integer XSTART 
    XCONTA = 0 
    XSTART = 1 
    If instr(XSTART,PPSTR,PDELIMITER) > 0 Then 
        Repeat 
            XXTMP(XCONTA) = mid$(PPSTR,XSTART,instr(XSTART,PPSTR,PDELIMITER)-XSTART) 
            XSTART = instr(XSTART,PPSTR,PDELIMITER)+1 
            XCONTA += 1 
        Until instr(XSTART,PPSTR,PDELIMITER) = 0 
    Endif 

    
    If XSTART <= len(PPSTR) Then 
        XXTMP(XCONTA) = mid$(PPSTR,XSTART,len(PPSTR)-XSTART+1) 
    Else 
        XCONTA = XCONTA - 1 
    Endif 

End XCONTA

Sage X3 trasfom Prospect to Customer, in Sales Contract

This tip has been tested on SAGE X3 version 6.

In Sales Orders it is possible to select a Prospect, X3 ask you if you want to transform it in customer. If you reply yes X3 opens the object BPC (Customer) populated with all the data of the prospect and by clicking Save you can create the customer.

This function is not present in Contracts.

Here how to enable it on Contracts :

Continue reading “Sage X3 trasfom Prospect to Customer, in Sales Contract”