Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Custum UI to display a View of a database

Creator
Creator

I would like to display a view of a database View on a Custom UI.  Are there controls to allow me to do in the Custom UI builder? If so what would I use.  Also I would like to have a pull down list of the different views to select and display.

 

5 REPLIES

Betreff: Custum UI to display a View of a database

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

Hi,

 

I'm doing this with some ootb functionalitys .... creating a dynamical SQL search for counting rows

 

Result = "Select Count(*) AS CountApp From TABLENAME"

with this number I have the quantity for the SubPartCollection

 

 

And then I have again a new dynamical SQL search to get the values and do the mapping.

Result = "Select * From ( Select ROW_NUMBER() OVER (Order By App_ID) As rownumber, COLUMNNAME, COLUMNNAME, COLUMNNAME, COLUMNNAME, COLUMNNAME From TABLENAME) As foo Where rownumber='" & Me.SubPartID & "'"

And I can use the grid on the Custom UI to show the result.

 

 

Does this help?

BR

Christian

Betreff: Custum UI to display a View of a database

Creator
Creator

I have also done this with a subpart collection.  I was really in search of a control that could display the results of a query without making a subpart collection.  By making the subpart collection I crate approc 10000 part families that when I relase a model adds about 2 minutes to creating the release XML and sendingsaving the xml into the reproject database.

Betreff: Custum UI to display a View of a database

Siemens Genius Siemens Genius
Siemens Genius

Bob,

 

There are two things that I can think of.

 

First, use multi-combo bound to a db constraint. It won't show the grid 'til you click on the elipsis though.

 

Second, use Christian's suggestion, but add a before-release/before-save event handler to zero out those subpart quantities by forcing (.setinput) a zero onto the property that drives the quantity of that subpart collection, and an after-load/after-release event handler to  revert that property to its calculated value. This would prevent the bloat of the save and/or release XML.

 

Rick

Betreff: Custum UI to display a View of a database

Siemens Genius Siemens Genius
Siemens Genius

I suppose you could even use the process-step-change events instead of the save/release/open events in order to enable it only when you're on the process step that needs to display the view.

Betreff: Custum UI to display a View of a database

Creator
Creator

I tried using event on process steps to set the subpart collection quantity to 0 but that causes another performance hit when Rulestream deletes 6600 objects.