Hi, I'm working on my first ever app and there is a learning curve I wasn't expecting. I have a pretty simple app.
- User inputs group name and QR code and TXID, says if it passed or failed, and why it failed.
- Some of this data gets displayed to a table that the user can edit if they did something wrong
- User moves on to the next one
- When they are done, they press done and a spreadsheet will be made with all the data they input in the formatting I want.
It looks like this (some potentially proprietary information removed):
So, I can't get anything to display to the table (Num is the counter in the upper left that goes up if you press "Next TXID"). When it tries to put the count in the table I get the error: Error setting property 'Data' of class 'Table':Data must be a numeric, logical, string, cell, or table array.
The counter variable is app.Count, and when I try to store data into arrays for future use (e.g. TXID(app.Count.Value) = app.TXIDEditField.Value then it says the two sides are incompatible.
I'm not sure what code to include here that is most helpful, but here are the most relevant functions:
function TXIDEditFieldValueChanged(app, event)
app.UITable.Data.Num(app.Count.Value) = app.Count.Value;
app.UITable.Data.TXID(app.Count.Value) = upper(app.TXIDEditField.Value);
drawnow();
end
function NextTXIDButtonPushed(app, event)
if app.PassButton.Value == true
deploymentPASSFAIL(app.Count.Value) = 'Pass';
else
deploymentPASSFAIL(app.Count.Value) = 'Fail';
end
deploymentFAILUREMODE(app.Count.Value) = app.FailureModeListBox.Value;
app.UITable.Data.PassFail(app.Count.Value) = deploymentPASSFAIL(app.Count.Value);
app.UITable.Data.FailureMode(app.Count.Value) = deploymentFAILUREMODE(app.Count.Value);
app.Count.Value = app.Count.Value + 1;
app.QRCodeEditField.Value = '';
app.TXIDEditField.Value = '';
app.PassButton.Value = true;
app.FailButton.Value = false;
app.FailureModeListBox.Value = 'N/A';
drawnow();
end