Hi, how to set the order of fields in measure drop down in pivot table in odoo? - odoo-10

I would like to set a specific order for the fields to appear in measure drop down in a pivot table.
Is it possible to alter the default order?

Related

Can we create Full text search on table which has Partitioning and Row Level Security enabled on it

I am trying to create a FTS on table which has partitioning and row level security enabled on it.
As FTS requires a single-column unique index, I have added a new identity column , but not able to create unique index on it as it asks to add partitioning key which will end up in multiple column index.
So, I tried creating a view on top of my table --> and then adding single-column unique index to make it an indexed view. But now the problem is as I have RLS enabled on base table, it's not allowing me to create an indexed view. I can't remove RLS from my table. Is there any workaround for this?
Thanks!

Using DAX to get a table from nested table

In powerBI, I using the python script and generate one table. The generated table is a nested table. Each row value is actually a table. and so now I want to use DAX to copy one specific row value(which is a table), just the "dataset_filtered" table shown as below.
what's the DAX code for this ? or any good suggestions ?
The nested table
This is M rather than DAX.
Click the drop down arrow in the name column to filter the row you want.
Click the expand arrows in the Value column to expand the table.

session item does not change when using lov in primary key

I am implementing a Interactive grid to perform DML operations on a table.
it has combined primary key of two columns
One primary key column is display only and refer to master table and another primary key column I want to have a LOV to select value. LOV is dynamic lov having a display and return value picked from another table.
Inserts are fine but session state item value is set for one row and all the operations are performed on that same row irrespective of which row is selected.
you can see a sample here
https://apex.oracle.com/pls/apex/f?p=128616:2:1964277347439::NO:::
master table name: sample
detail table name: sample_child
primary key in sample child : ID and Name
pop lov is implemented in NAME
LOV values are picked from table: Sample_uncle
LOV display : ID || '-' || NAME
LOV return : ID
you can try to update blabla column of sample_child table to see the issue.
I am not sure how I can give you access to look at the implementation.
I have already tried all the options I can think of
This is to do with your primary keys, the detail table does not appear to have proper ones, thats why it always tried to update the first entry, and I think this is also why every row is marked when you load the table.
Primary keys also do the annoying thing of refusing to be empty, as you can see if you insert a new row, the middle column(which is a PK) is filled with 't1001'.
Since you are dealing with simple tables(and not a whole bunch of joined tables) I always consider it best to use ROWID as PK. So set ROWID as PK for the master table, and ROWID for the detail table. And have the detail table have a Master table be your master table, and then click on the first column in the detail table and set the master column for it. And I also personaly always hide the column that is linked.
I would advise you use ROWID whenever possible as its just so much easier to work with, it does mean you might need to set up a validation to prevent someone adding duplicated values for your actual PK, but since the PK is in the underlying table, they cant enter it anyways(but if you have a validation, the error will be much prettier), whilst if the column is a PK, APEX will prevent duplicates by default.
I hope this helps

Add sub partition on another column in oracle

I have a table which has two partitions (by range): first_half and second_half based on a column "INSERT_DAY".
I need to add subpartitions "SUCCESS" and "NONSUCCESS" based on the values of another column "STATUS" (subpartition by list) i.e. I need to transform my range partition to composite (range-list) partition.
I do not wish to drop existing tables or partitions. What is the ALTER query for this?
PS: The database is Oracle 9i
No alter query for adding subpartitions as far as i know.
To get the desired result performe the folowing steps
Create the table in the structure you want using create as select with the partitions and the sub partitions.
switch the names of the two tables.
you can also explore the use of dbms_Redefinition but if you have a luxury of a littel downtime it's not worth it.

how to hide an external table when there is no data in internal table in BIRT?

I have two tables one inside the other. When there are no detail rows in the inner table i am making it invisible. but i am not able to make the external table invisible.
In detail My inner table heading row and footer is visible even when there are no detail rows so i made the table visibility to true when no detail rows. But i am not able to make the external table invisible with the same logic. it is because even though the inner table is invisible the detail and footer is there so when i say no detail rows no visibility it is not working. so how can i hide the external table when the internal table is invisible?
I would try Binding the data set to the external table and making an aggregation that counts the number of rows in the data set.
Click on the Table
go to Binding in the Property Editor
click Add Aggregation
I called the Column Binding Name RowCount and set the Function to COUNT. Set the Expression to one of the columns from your dataset that you have included in the binding. In my case, I set Expression to row["columnname"].
Click on your table.
go to Visibility in the Property Editor.
check Hide Element and set the Expression to:
row["RowCount"]==0 || row["RowCount"]==null
The element will only display when the RowCount aggregation counts more than 1 row in your dataset.
My solution for this was to create a function that counts the records that meet the desired criterion, in my case select count(*) from my_table where user_id = id.
Then I inserted this function as a detail component that gets the count based on the selected table record.
Then I used the result of the count as a visibility rule. count > 0. this way I can hide the tables that return empty.
Using this trick is possible to hide the secondary table but the count details component will be still there, if you want to hide it you have to put it in a flexbox component. then in the visibility rules you an access you flexbox component and include the rule count > 0

Resources