Since the OP explicitly provided a row index as the first argument to \inMyTable, I took that to mean that there existed the possibility that the rows could be input out of order. Otherwise, there would be no need to pass the row index, and instead just use an incremented counter to advance rows.
With that in mind, here's a token-based version that allows the rows to be entered in any order and, at the time of row input (by way of indirect addressing), sorted by the column-1 index.
\documentclass{article}
\usepackage{ifthen}
\newcounter{rowindex}
\newtoks\mytabtoks
\newcommand{\AddToToks}[2]{#1\expandafter{\the#1#2}}
\newcommand{\XAddToToks}[2]{\expandafter\AddToToks\expandafter#1\expandafter{#2}}
\newcommand\inMyTable[3]{%
\expandafter\def\csname itr[#1,1]\endcsname{#2}%
\expandafter\def\csname itr[#1,2]\endcsname{#3}%
\ifnum#1>0\csname MyTabRows\endcsname\relax\def\MyTabRows{#1}\fi%
}
\newcommand\createMyTable{%
\setcounter{rowindex}{0}%
\whiledo{\value{rowindex}<\MyTabRows}{%
\ifnum\therowindex>0\relax\AddToToks\mytabtoks{\\}\fi%
\stepcounter{rowindex}%
\edef\colA{\therowindex&
\csname itr[\therowindex,1]\endcsname &
\csname itr[\therowindex,2]\endcsname}%
\XAddToToks\mytabtoks{\colA}%
}%
\begin{tabular}{|r|l|r|}
\the\mytabtoks
\end{tabular}%
}
\newcommand\resetMyTable{%
\setcounter{rowindex}{0}%
\whiledo{\value{rowindex}<\MyTabRows}{%
\stepcounter{rowindex}%
\expandafter\let\csname itr[\therowindex,1]\endcsname\relax%
\expandafter\let\csname itr[\therowindex,2]\endcsname\relax%
}%
\def\MyTabRows{0}%
\mytabtoks{}%
}
\begin{document}
\inMyTable{4}{Computers}{10/16/16}
\inMyTable{1}{Books}{10/14/16}
some other text here
\inMyTable{2}{Magazines}{10/15/16}
\createMyTable
\bigskip
\resetMyTable
\inMyTable{3}{Magazines}{10/15/16}
some other text here
\inMyTable{1}{Books}{10/14/16}
\createMyTable
\end{document}

\inTableand\createTableare not standard (or even commonly seen) commands, which file do you have that defined them? – David Carlisle Oct 14 '16 at 15:33