Create a DataView. Is this OK to do?

Just a general question to see if what I am doing will create any unforeseen issues. I am creating some dataviews that I only want in session, that is I do not need them to talk back to the server. I am setting them up like this and would appreciate some feedback.

image

They may need to make you your own section.

I don’t see a problem with it, but I’m not an expert.

1 Like

Don’t feel bad about asking all the questions either.

I have a sneaking suspicion that I will be referencing a lot of these in the near future. :sob:

Yup–that’s perfectly okay.
Strictly speaking, you don’t even need the Dataset ID and Data Table defined, but you won’t get intellisense without those.

In essence, the stuff in the Data View group contains properties that define the in-memory dataset handled by the application.
Setting up the stuff in the Server View maps the Data View properties to the DB Tables on the server.

3 Likes

I have a related question… do you need to “initialize” custom dataviews such as this?

Actually… here’s an example… I started building a Dashboard from scratch. I had to add in a TransView dataview. On most “stock” forms, I see events that initialize the TransView. When is this necessary?

Yup.

OR–check the “Key Field” checkbox for any control bound to this field to give it the ability to add a row. Although, you will need to set up additional events to make this all work, but it will unlock the field for you before initialization.

1 Like

I will let anyone correct my response, but this is what I have seen.

If you just need a dataview that has no predetermined structure, you can just type the name of the DV in the event/widget and the system will automatically create it under System Dataviews. The problem with this is that they are difficult to work with after creation. Think about my post where I was trying to copy from one DV to another, the “another” DV was created on the fly. I believe that is what was causing my issues. Also, the DV will only “appear” during the event that it is being called in. It is not accessible until the event happens.

I am finding it best to create the a new DV instead of doing it on the fly.

2 Likes

That was my next question… I wanted to build a search TB on the top of my form to perform a customer search. If I add TransView.CustID (or any other binding) to that field, it is greyed out when I preview… so I can’t perform the search and rest call. I had played with the KeyField checkbox… but I think I need to initialize the TransView on formload and perhaps it’ll work.