Code: Select all
if DIS contains OrderSequential
{
NS = 1
listP ++
NumberSet := listP ","
}
else if STY contains ClearList
{
NS = 1
listP ++
NumberSet := listP ","
}
else
{
NS = 0
NumberSet =
}
Code: Select all
if DIS contains OrderSequential
{
NS = 1
listP ++
NumberSet := listP ","
}
else if STY contains ClearList
{
NS = 1
listP ++
NumberSet := listP ","
}
else
{
NS = 0
NumberSet =
}
Code: Select all
if InStr(DIS,OrderSequential) || InStr(STY,ClearList)
{
NS = 1
listP ++
NumberSet := listP ","
}
else
{
NS = 0
NumberSet =
}
Code: Select all
if InStr("|" DIS "|","|" OrderSequential "|") || InStr("|" STY "|","|" ClearList "|")
Code: Select all
If(InStr(DIS,"OrderSequential")||InStr(STY,"ClearList")) ; Both previous code examples used OrderSequential and ClearList as vars instead of strings.
NS:=1,NumberSet:=++listP "," ; ++ListP is used instead of a separate assignment
else NS:=0,NumberSet=""
PuzzledGreatly, where you not trying to see if both DIS and or STY contained text?AfterLemon wrote:This is a non one-line version that will compare the *var* DIS with the STRINGS you specified.This is a one-line version (essentially the If is replaced with a "?" and the else is replaced with a ":".Code: Select all
If(InStr(DIS,"OrderSequential")||InStr(DIS,"ClearList")) ; Both previous code examples used OrderSequential and ClearList as vars instead of strings. NS:=1,NumberSet:=++listP "," ; ++ListP is used instead of a separate assignment else NS:=0,NumberSet=""
((InStr(DIS,"OrderSequential")||InStr(DIS,"ClearList")) ? (NS:=1,NumberSet=++listP ",") : (NS:=0,NumberSet=""))
Both should work identically.
Updated my post to reflect the stupid mistake I made.TLM wrote:PuzzledGreatly, where you not trying to see if both DIS and or STY contained text?
If so ignore AfterLemon (don't worry we do it all the time)
@TLM, You are mixing up variables and literals.TLM wrote:PuzzledGreatly, where you not trying to see if both DIS and or STY contained text?
If so ignore AfterLemon (don't worry we do it all the time)
Code: Select all
if DIS contains OrderSequential ; <-- OrderSequential is a literal string
if InStr(DIS,OrderSequential) ; <-- OrderSequential is a variable
lol nice workFanaticGuru wrote:Now everyone is right and everyone is happy.
FG