Text Variables Not Testing Equal
I am putting the finishing touches on a Band and Orchestra student tracking solution and I am currently going through all the things I "settled" for and trying to make them the way they should work. Anyway, I have a script that basically takes a students name and concats it with the current date and places it in a field called userHistory when a school instrument is assigned to a student. If another student is assigned the same instrument it adds the user name to the userHistory and separates them with a carriage return.
I tried to modify the script to test if the students name is already there (if you clicking in the field and out again in runs the script again).
In the Script Debugger, both variable are the name but it doesn't test positive. Here is the script.
Allow User Abort [Off]
if [IsEmpty (Inventory::studentUse)]
Set Variable [$name; Value:Student Info::fullName & " " & Get (CurrentDate)]
Set Variable [$i; Value:1]
If [$name = MiddleValues ( Inventory::userHistory ; $i ; 1)] // Debugger shows these two as being equal
Set Variable [$i; Value:$i+1]
Exit Loop If [MiddleValues ( Inventory::userHistory ; $i ; 1) = ""]
Replace Field Contents [No dialog; Inventory::userHistory; $name & "¶" & Inventory::userHistory]
Thanks for any help you can offer