I am upgrading a C# customization. I am trying to add an unbound column to a kinetic dataview. This ends up being just being used in a button click when each row is completed. In C# I simply created a column and added it to the datatable with code. In kinetic I added it to the Dataview through the UI. It does not show up in the preview as I am assuming it needs to be bound to something. I can’t figure out how to bind it to Transview as I don’t need the information bound to a database column. Any help would be appreciated.
TransView is a runtime view which can be assigned variables on the fly. Just bind whatever control to the field and and it will show up in TransView when data is assigned to it. No need to add it to the view in App Studio.
In other words, on your button click, use row-update to assign, let’s say, “Blah Blah Blah” to TransView.MyCoolNewVariable and when you click the button, it will add the column “MyCoolNewVariable” to TransView and assign it “Blah Blah Blah.”
I understand that through a control. Unfortunately I need this field to be in a grid view and allow the user to enter text through all rows then on button click use that data.
I wouldn’t use TransView, then, if you’re adding a non-Db column to your grid.
Add it to the same view as the rest of the data, then add it to the column list in the grid.
I am struggling with this. Every time I add the column to the grid the grid stops returning rows. What am I doing wrong?
You added it to both the grid model and the dataview?
Yes. It doesn’t show up in the drop down list I just type it exactly how it is in the dataview.
Yup–that’s how it should be added.
Can you verify if you’re adding it to the Grid Model > Columns or the Provider Model > Columns?
Alternatively, run your layer, open Dev Tools, go to the Network tab: are there errors?
There are no errors. I am using the grid model > Columns.
Out of curiosity, when you preview your layer and the rows don’t come back, what happens if you click the overflow menu and click refresh? What call is being made in the Network tab?
Is Count your field name? If coming from a BAQ, I’m pretty sure that reserve words cannot be used as column names.
Just thought I’d ask the question.
Count is the field and it is coming from a BAQ. Let me modify and test.
I just validated the issue.
Looks like when you use a BAQ, it’s sending the select statement with a column that doesn’t exist.
Two options:
-
Add the column as a calculated column in the BAQ and use that.
-
Forego using the BAQID and set up the Provider Model to use the DynamicQuerySvc and add the column that way.
Ok. I tried the calculated field but it does not allow it to be editable.
I will try the provider model.
Wondered about that–I hadn’t actually attempted it. Speculating: you could probably make the BAQ updateable with the calculated field as updatedable and go off of that, but that seems like work.
Another option may be to set up a dataview for your BAQ, populate it (assuming it’s not huge) after GetByID, then bind the view to your grid. That should allow you to do the original column add.
I never thought of that. I will try to do it after the getbyID.
Kinetic: making easy tasks nigh impossible.
I’m so glad I am not the only one who thinks that. Thank you so much for your help!
Hannah,
I’m trying to add the line order value to the transview for the Fullfillment workbench. I made a BAQ which returns the value and has parms. I connected the parms to the fields in the view but I don’t see how to bind the BAQ field to the column in the grid. You say no need to add it in App Studio, but where else would you add it?
thx!
Mike
Use an event that has a row-update hey and just set it on the fly.