I am having an NSTableView with a bound NSArrayController. When one or more rows are selected, I want to show the name of the selected rows in an NSTextField. If only one row is selected the value should be shown, if multiple rows are selected the content "multiple" should be shown in the text field.
I set up my NSTextField bindings as follows:
If the selection of the table view updates, e.g. I select one row the content of the text view gets the following:
(
val1
)
If I select multiple rows the text field shows this content:
(
val2,
val1
)
Why is the text field not properly displaying the contents of the Array?
By accident I found the solution. The binding has to be changed to:
self.arrayController.selection.name
Related
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.
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.
I am trying to make a cost value populate in an interactive grid column based on the value selected in an Item column.
My setup is:
An "Item" table which contains a list of Items, and the "Cost" assigned to the item.
A "Quote" table which contains general info about the quote, i.e. company name, date created, signed, signed date etc.
A "Quote_Items" table which assigns an Item to a quote by Quote_ID, and Item_ID. I added a Cost column to the Quote Items table to be able to see it in the interactive grid, and update it.
For the Quote Items I created an Interactive grid to add Items to the quote.
I set the Item_ID column in my interactive grid to a popup LOV which populates the Item_ID based on the selected item.
To populate the "Quote_Item.Cost" I added a dynamic action to the Item_ID column to:
Event:Change
selection Type: Column(s)
Region: ..Item List
Column(s): Item_ID
Action: Set Value
Set Type: SQL Statement
SQL Statement: SELECT I.COST
FROM WIP_ITEMS I
WHERE I.ITEM_ID = ITEM_ID
Items to Submit: COST
The result is, when I select an Item from the dropdown, all values in the "Items.Cost" table are displayed in comma separated values in the field:
Quote Item populating all item costs in one field
It seems like the "WHERE I.ITEM_ID = ITEM_ID" part of the SQL query is not working correctly? How can I get it to show only the Value associated with the Item_ID?
Syntax to reference a column in the SQL query > :COLUMN_NAME
So your SQL query should looks like this:
SELECT i.cost
FROM wip_items i
WHERE i.item_id = :ITEM_ID
And you need to modify the "Items to Submit" parameter too, because it must always be the value which your reference in the where condition, so in your case it should be:
Items to Submit: ITEM_ID
What I wanted is to sort records in a multi-record block before saving like this:
I already tried to change the order by of this item in here:
But it has no effect(I think).
I also want to know if I can automatically sort records in
WHEN-NEW-RECORD-INSTANCE in block level so that after entering the last record, it will be sorted.
We need to have a multi-record block ( block1 ) with Query Data Source Name property set to a table name which has a varchar2 type column namely str1,
and a Text Item (str1) with Database Item Property is "Yes" ( i.e. default ),
and lastly have a button with the following code inside of WHEN-BUTTON-PRESSED trigger of it :
declare
v_blk varchar2(25) := 'block1';
begin
commit_form;
go_block(v_blk);
execute_query;
end;
Provided we set ORDER BY Clause property set to ascii(str1) as in the picture below, we'll be able to get the desired output when the button pressed after letters are entered in the order of 'h','e','l','l','o'.
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