Saltar al contenido principal

GetTextFromLocalFile

Structure

GetTextFromLocalFile(sFileName,sStartFlag,sEndFlag)

Parameters

| Parameter | Type | Description
| sFileName | String | the name of the file in the IndySoft temporary directory that should be read. This is simply the file name plus the extension - this should NOT include the full directory pathsStartFlag | String | the text that should be searched to begin the return text. The return text will NOT include this sStartFlag textsEndFlag | String | the text that should be searched to end the return text. The return text will NOT include this sEndFlag |

Return Value

String

Description

Functions in the 'Local File Read/Write Functions' group are used typically to create and read xml (or other) files from a common network directory to sync IndySoft's data/functionality with another system, like an accounting system. This function requires that a fie having the name sFileName exists in the current IndySoft temp directory - likely copied there from the 'GetLocalFile' function. Typically this is an xml file with data from another database application. Use this function to read the file, searching for any text that occurs after sStartFlag, but before sEndFlag. So if you are reading an xml file (see snippet below), and you need the 'Unit Price' of '1.260':
 
<DiscountValue>0.84</DiscountValue>
<DiscountPercentage>40.0</DiscountPercentage>
<UnitPrice>1.260</UnitPrice>
<StandardCost>0.97</StandardCost>
 
Then you would call the function as:
 
sUnitPrice = GetTextFromLocalFile('FromMyAccountingSystem.xml', '<UnitPrice>', '</UnitPrice>')

Example

No example provided

Application Compatibility

IndySoft Calibration Management, IndySoft Commercial Lab Management, IndySoft Tool Management

Also See

No related topics |