Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case statement that will populate a txt file if value is not blank

Status
Not open for further replies.

kdjonesmtb2

Technical User
Nov 19, 2012
93
US
I would like perform the following statements that will populate a txt file if variable is not blank

This is need as the population of these fields is situational so the datatable may not always have data

Thanks


Case variable not blank (not sure on syntax)

qfile1.Write((DataTable.Value("QTY_File_Header",dtGlobalSheet)))
qfile1.Write((DataTable.Value("Common_Delimiter",dtLocalSheet)))


qfile1.Write((DataTable.Value("QTY01_673_Quantity_Qualifier",dtGlobalSheet)))
qfile1.Write( S_QTY01_673_LEN) ' spacing for any left off characters
qfile1.Write((DataTable.Value("Common_Delimiter",dtLocalSheet)))



qfile1.Write((DataTable.Value("QTY02_380_Quantity",dtGlobalSheet)))
qfile1.Write( S_QTY02_380_LEN) ' spacing for any left off characters
qfile1.Write((DataTable.Value("Tilde",dtLocalSheet))) & vbcrlf '
 
Hello

I tried the following but I am getting this syntax error

"Expected ')'"


Dim x

x=DataTable.Value("QTY01_673_Quantity_Qualifier01",dtGlobalSheet)


If (len(trim(cstr (x))) then

qfile1.Write((DataTable.Value("QTY01_673_Quantity_Qualifier01",dtGlobalSheet)))
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top