Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Adding templates has bug with indices between template and table #436

Closed
Freymaurer opened this issue Jun 20, 2024 · 0 comments
Closed
Assignees
Labels
Type: Bug Something is not working, and it is confirmed by maintainers to be a bug.

Comments

@Freymaurer
Copy link
Collaborator

Freymaurer commented Jun 20, 2024

Contact Details

No response

What happened?

Error: Specified index is out of table range! Table contains only 10 columns.
    at SanityChecks_validateColumnIndex (ArcTableAux.fs:68:40)
    at ArcTable.fs:271:34
    at Array.forEach (<anonymous>)
    at ArcTable.RemoveColumns (ArcTable.fs:271:97)
    at ProtocolView.fs:168:33
    at HTMLUnknownElement.callCallback2 (chunk-W7WX4MSO.js?v=e8058188:3674:22)
    at Object.invokeGuardedCallbackDev (chunk-W7WX4MSO.js?v=e8058188:3699:24)
    at invokeGuardedCallback (chunk-W7WX4MSO.js?v=e8058188:3733:39)
    at invokeGuardedCallbackAndCatchFirstError (chunk-W7WX4MSO.js?v=e8058188:3736:33)
    at executeDispatch (chunk-W7WX4MSO.js?v=e8058188:7016:11)
let tablecopy = model.ProtocolState.TemplateSelected.Value.Table.Copy() //copy template
for header in tablecopy.Headers do
    let containsAtIndex = model.SpreadsheetModel.ActiveTable.Headers |> Seq.tryFindIndex (fun h -> h = header) //find index in table
    if containsAtIndex.IsSome then
        columnsToRemove <- containsAtIndex.Value::columnsToRemove
log columnsToRemove
tablecopy.RemoveColumns (Array.ofList columnsToRemove) //remove from template 😞

What did you expect?

No response

Host

Applies to All

Host Details

.

Swate version

.

@github-actions github-actions bot added the Status: Needs Triage This item is up for investigation. label Jun 20, 2024
@Freymaurer Freymaurer changed the title [Bug]: Adding multiple templates fails [Bug]: Adding templates has bug with indices between template and table Jun 20, 2024
@Freymaurer Freymaurer added this to the Swate v1.0.0-beta.04 milestone Jun 20, 2024
@github-project-automation github-project-automation bot moved this to Done in ARCStack Jun 20, 2024
@Freymaurer Freymaurer self-assigned this Jun 20, 2024
@Freymaurer Freymaurer added Type: Bug Something is not working, and it is confirmed by maintainers to be a bug. and removed Status: Needs Triage This item is up for investigation. labels Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something is not working, and it is confirmed by maintainers to be a bug.
Projects
Status: Done
Development

No branches or pull requests

1 participant