dash.Datatable values are resetted when table row number is changed - datatable

I have a dropdown to select no. of rows displayed in dash.datatable (eg. 4 rows default)
But when changed row no. is changed in dropdown my table values are gone.
I want them unchanged when increase the row value. can someone help me on this.
Callback used to fetch the row in datatable is here
#app.callback(
Output('data_table','data'), Input('dropdown','value'),
)
def table(rows):
if rows is not None:
return dbdata.head(rows).to_dict('records')
I don't want to include any button to add new row, just when the dropwdown is changed I want the table value to remain unchanged.

Related

Oracle Apex Interactive Grid - Add new row not inserting

I have a page on my app that allows the user to create (insert) a new row on my table:
Employee Manager id Status
john ryan 1 Active
angela ryan 2 Active
steve jim 3 Inactive
Id column acting as primary key.
My Interactive Grid is working ok for updates, the 'add row' button works (a new row is displayed and info can be added into it). But when clicking on save, this 'new row added' disappears, info doesn't get inserted into the table at all.
My query as follows:
select
--PK
id,
Manager,
Employee,
--Update only available when Status is active:
decode(Status,'Active', 'U',
'X') as Editable
from my_table
IG attributes:
Edit = enabled
Allowed Operations = update row, add row
Allowed Row Operations Column = Editable
Lost Update Type = row value
Add row if empty = Yes
Anybody has any idea why?
Thank you all

Kendo UI Grid jQuery top cell value populates other cells within this column

I would like to update all rows inside one column. Each column would have its own input which will update the rest of the rows. Currently I have an existing edit batch table. I was wondeing if it was possible to:
select a column (maybe with checkbox)
Row 1 is empty, however will trigger a function
This function takes the input value (which the user will type) of row 1 cell and populate this value for every row inside the that column.
COL 1 || COL 2
row 1 || row 1
row Z || row Z
After this the user should still be able to activate the cancel button and the original data appears back in the table. The table data should not be saved unless the saved button is pressed.
I've tried a fucntion using a button where we would execute row.set(column, value), however this would refresh the grid table and the original data would reappear.

Oracle Forms Post-Query FRM-40735 and ORA-01422

I want to display the item from different table, I am using POST-QUERY trigger
:
SELECT Stock_code
INTO :exchange.stockcode
FROM Exchange_Stock
WHERE Exchange_code = :exchange.Exchange_code;
it come up with FRM-40735 and ORA-01422
but it display some of the record (not all),
I have no idea what is wrong
Most probably the POST-QUERY trigger fires just after the fields of table-based block with multiple records are populated. Obviously Exchange_code values are not unique throughout the table data, whereas a SELECT .. INTO .. FROM ... clause only can bring one row record.
So, you can try to filter out the results so as to get single rows for each parameter fields combinations such as :exchange.Exchange_code & :exchange.code_order instead of only :exchange.Exchange_code field within the WHERE condition :
SELECT Stock_code
INTO :exchange.stockcode
FROM Exchange_Stock
WHERE Exchange_code = :exchange.Exchange_code
AND code_order = :exchange.code_order;
where important thing is to get single row from the query matching for each record in the data block. You can still add more condition to the query if this condition is not provided yet.

can i change all column values according to master table in oracel forms

I am creating POS in oracle 11g. in the sale form i have two master and child table,one column is 'type' who is exist in those table, child table is in table mode has 10 rows.
now i what to know is it possible that after inserting 10 rows in child table when i change 'type' in master table then also change all values in child table according to master table.
i am trying list item in master table but it's only change current values of child table. how can i change all values in child table.
The way you put it, there are two options.
If changes are committed (i.e. both master and detail rows are stored into the database), you could update detail rows as
update detail_table d set
d.type = :master_block.type
where d.foreign_key_column = :master_block.primary_key_item;
and then requery the detail block as
go_block('detail_block');
execute_query;
Another is to loop through the detail block and modify items row-by-row:
go_block('detail_block');
first_record;
loop
:detail_block.type := :master_block.type;
exit when :system.last_record = 'true';
next_record;
end loop;

Oracle List of value (lov) refresh when select any row

I have created a LOV on oaf page. The issue is when i select any row from LOV page, it's reloading the (lov) page instead returning the values to back page.
If we keeps opened LOV window for more than 5 minutes and then select any row, it works.
Thanks in advance
In OAF, while creating an LOV, i.e., messageLOVInput item, lovMap is required to be set.
Make sure the LOV Region Item, Return Item and Criteria Item in this lovMap is set properly.
LOV Region Item : field from which value is picked from lov table
Return Item : field in which value should be set on selection from list of values
Criteria Item : field which is validated for value

Resources