Maximo view wildcard attributs - view

I want to make a view with attributs that have wildcard search type. Originally attributs have wildcard as a serach type. But they change to none after view is created. I cant change them after database is created, because they are read-only. Is there a way to set search type with SQL or is there a diffrent solution to this problem.
My SQL code:
CREATE VIEW testviewv AS
SELECT workorder.WORKTYPE, workorder.STATUS, person.DISPLAYNAME
FROM workorder, person
where workorder.OWNER = person.PERSONID

Related

Can :xdo_user_name be used in list of value in Oracle bi publisher? Or just works in data set

I am making a data mode. Involve a list of values to bind with parameter. Just want to ask if adding :xdo_user_name as the list of value sql parameter is possible?
I am hoping that user login, the menu will only show related data to him.
Many thanks.
Not sure if this can work or not.
You could create a List Of Values - Type SQL Query
select :xdo_user_name as USER_ID from dual
Now create new parameter of (parameter) type Menu and based on the above LOV. Next, in your datamodel you can use the newly created parameter any way you need.

Update view schema

Hi I would like to be able to update a view to point to a table in a different schema as in example below, change SCHEMA1 to SCHEMA2. No other change to the SQL.
Can anyone suggest an efficient way to achieve this, ideally a string replacement.
I can do CREATE OR REPLACE FORCE VIEW and provide the list of fields. This doesn't seem a good option as I have about 40 views re repoint.
CREATE OR REPLACE FORCE VIEW CUST.CustOrdersView as
SELECT field1, field2 etc.. from
SCHEMA1.CUSTOMER ;
Your problem is simply that you have hardcoded the schema name in the views' queries. Instead of that you could have created a synonym:
create synonym CUSTOMER for SCHEMA1.CUSTOMER;
Then in your view you would have simply referenced CUSTOMER.
To repoint the view to another schema you would have to change the synonyms:
create or replace synonym CUSTOMER for SCHEMA2.CUSTOMER;
That's still work but it's much easier to generate those statements from the data dictionary views than it is to change all the view queries.
(If there is a namespace clash - that is, if schema which owns the views already has an object called CUSTOMER - you would need to use a different name for the schema.)
You may not regard this as a helpful answer, because it doesn't really solve your current problem, but it may help you avoid a similar situation in the future.

Maximo: How to enable search in list tab in application where main object is view

Suggestions are appreciated.
I created DB view ABC_VW in maximo database.
Created object with name ABC_VW in maximo.
Created power application with name ABC with main object ABC_VW in maximo.
On list tab the search is disabled.
How can I enable the search?
Note: I tried updating search type to WILDCARD from backend in both tables MAXATTRIBUTE and MAXATTRIBUTECFG but no luck.
Please suggest.
Whenever a view is created in DB and object is created on the view, a primary column has to be updated in MAXATTRIBUTECFG table as
update maxattributecfg set changed='Y', searchtype='WILDCARD', primarykeycolseq='1', defaultvalue=null, maxtype='ALN', length=22 where objectname='ABC_VW' and attributename='XXXXXX';
update maxobjectcfg set CHANGED='A' where objectname in ('ABC_VW');
Then apply configuration changes from the Database Configuration.
This is how the field from view can made searchable.

Multi Tenancy with Full Text Search

I am trying to implement Full Text Search in a SQL View which is supporting Multi Tenancy Implementation using TenantID Filter to retrieve data from the underlying table.
Eg: Table Name - BOOKS which is having a TENANT_ID Column
View Name - VUE_BOOKS which makes use of SUSERSID() function to filter the TENANT_ID column from table.
In order to set up Full Text Search that view must have Full Text Index.
To set up Full Text Index that view must be an Indexed view.
But unfortunately I am not able to create Index for the view because of non deterministic value from the inbuilt function SUSERSID().
How will I implement Multitenancy and Full Text Search in this scenario without exposing Table Name ?
Any Suggestions ?

TableAdapter to return ONLY selected columns? (VS2008)

(VS2008) I'm trying to configure a TableAdapter in a Typed DataSet to return only a certain subset of columns from the main schema of the table on which it is based, but it always returns the entire schema (all columns) with blank values in the columns I have omitted.
The TableAdpater has the default Fill and GetData() methods that come from the wizard, which contain every column in the table, which is fine. I then added a new parameterized query method called GetActiveJobsByCustNo(CustNo), and I only included a few columns in the SQL query that I actually want to be in this table view.
But, again, it returns all the columns in the master table schema, with empty values for the columns I omitted.
The reason I am wanting this, is so I can just get a few columns back to use that table view with AutoGenerateColumns in an ASP.NET GridView. With it giving me back EVERY column i nthe schema, my presentation GridView contains way more columns that I want to show th user. And, I want to avoid have to declare the columns in the GridView.
When you add a new query to a given TableAdapter, it is going to assume the schema in which it is attached to, which is why you are getting blank values for the columns you don't want.
Since you mentioned having already created the procedure, what you need to do is use the Server Explorer to connect to the database and simply drag that stored procedure over into your XSD work area. What this will do is create a separate QueryAdapter that will have just the columns you specified (still strongly typed) and you can bind/interact with your GridView using that QueryAdapter instead.
Is the strongly typed dataset used in another query that returns all the rows from the table?
What you could do is create a dataview using the strongly typed dataset and expose a data table for your DataGridView.
I'm not sure what your requirements are totally, but this example should help you:
DataView dv = new DataView(ds.<Your_Table>);
// This will create a new data table with the same name,
// But with only two columns from the original table.
// This could then be bound to your data grid.
DataTable dt = dv.ToTable(false,
ds.<Your_Table>.<Your_Column1Column>.ColumnName,
ds.<Your_Table>.<Your_Column1Column>.ColumnName);
Just delete the columns you don't want at run-time before you bind to your Gridview. The underlying class is still just a DataTable after all.

Resources