Jump to content
Macro Express Forums

Help: Macro Look up


MrBiggz

Recommended Posts

I need to create a Macro that prompts for an office number, and when the office number is given, it checks against a CSV file to see if that office is listed. If listed it returns a message on the screen of "VERIFIED" and if not's found in the file, returns a separate message of "UNVERIFIED". The problem I'm having is it checks against the file, but it returns both VERIFIED and UNVERIFIED messages even the office numbers are listed. Here's a copy of the code.

 

<CLEARVAR1:T:ALL><TVAR2:01:02:FEnter 5 Digit Branch NumberFFCenter:Center><BTFBEG:002:000001:000000:C:\Test.csv><IFVAR2:4:02:1:T1><TBOX4:T:4:CenterCenter000278000200:000:DIAVERIFIED><ENDIF><IFVAR2:4:02:8:T1><TBOX4:T:4:CenterCenter000278000200:000:NO DIAUNVERIFIED><ENDIF><BTFEND>

Link to comment
Share on other sites

Thanks. It kinda worked. So the CSV file has in the first column about 300 cells filled with information. I just need to do a check against that CSV file to see if the data entered from prompt (%T1%) is anywhere in that column. And if so display "Verified" and if not, display "NOT Verified". Unfortunately it's only reading the last cell that has data and putting that into variable %T2%. I'm not sure if I'm doing this correctly at all, I'm just kind of playing around to see if it is actually possible.

 

Thanks for the help!!

Link to comment
Share on other sites

I GOT IT!! :) So here's the final code that got it to work!

 

Clear Text Variables: All

Variable Set String %T1% from Prompt

Text File Begin Process: "Test.csv"

If Variable %T2% Contains %T1%

Break

End If

Text File End Process

If Variable %T1% = variable %T2%

Text Box Display: DIA

End If

If Variable %T2 does not contain variable %T1%

Text Box Display: NO DIA

End If

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...