Is it possible to disable a button column in an ObjectListView by row? - objectlistview

In an ObjectListView you can make a column a button column by setting the IsButton property to true.
Is it possible to enable/disable the button based on data in the row?

I would say yes.
The docs state
If the aspect for a cell is null or empty, no button will be drawn. Use this to produce rows without buttons.
So you can probably just use an AspectGetter that checks the data of the model object from the current row and returns NULL depending on the value.

Related

Is it possible to not allow null values for particular in an excel data entry spreadsheet (VBA?)?

I have an excel worksheet where I have a number of manual data entry and calculated columns, which is to be filled in line by line with the rows filled from left to right.
I have a few columns which I want to ensure are not left blank as this data entry is carried out.
E.g.
Here I am entering data from left to right on the 3rd row and want to ensure that if the person doing the data entry manually accidentally skips the "Unique ID" column and tries to fill in "Type" first, they will be forced back to the "Unique ID" cell or at least experience a pop-up to tell them to enter in "Unique ID" first.
Is this something that can be done?
This can be handled in different ways; one of which is adding a simple data validation rule.
Add a data validation rule to the 2nd cell that checks whether or not the prior field is blank. If so, don't allow entry in the cell and display a pop-up message.
Data validation rules just have to have a a TRUE result.
Add this formula to a custom data validation rule on the 2nd cell.
not(isblank(c7))
Then, if the user tries to populate the 2nd cell while the 1st is still blank, the user gets an alert message and then the cell contents is cleared.
UPDATE #1
If you need to create a dependency for a data validation list you could add a table to a new sheet to act as your list handler. The basic theory is that one column is filled with an index of each row, a 2nd column checks to see if the criteria has been met, a 3rd column contains every item that could appear in the list and a 4th column is a formula that builds the list based on all of the criteria.
Here is a working example. It's a little different than your scenario but it shows the premise. The example below builds a list of items that can only be selected once. Once the item is selected in a cell, it does not appear in the lists for other cells.
t_FinalPlans_Medical is the name of the table.
medicalRow_FinalPlanSelections is a named range containing the cells that have the data validation rules/drop-down lists.
dataValid_FinalMedicalPlans_OptHeading is a named range holding the column header.
INDIRECT("t_FinalPlans_Medical[[#Headers],[Column1]]")
dataValid_FinalMedicalPlans_OptList is a named range for the index column.
INDIRECT("t_FinalPlans_Medical[Index]")
Index Column Formula IF([#[Unselected Plans]]="","",MAX($D$7:D7)+1)
Final Plan Selections Column
Each cell in this column is manually typed.
Unselected Plans Column Formula
IF(COUNTIF(medicalRow_FinalPlanSelections,[#[Final Plan Selections]])=0,[#[Final Plan Selections]],"")
Column1 Formula
IFERROR(INDEX([Unselected Plans],MATCH(ROW()-ROW(t_FinalPlans_Medical[[#Headers],[Column1]]),[Index],0)),"")
Formula used as Data Validation (dynamically expands) OFFSET(dataValid_FinalMedicalPlans_OptHeading,1,0,MAX(dataValid_FinalMedicalPlans_OptList),1)
https://trumpexcel.com/excel-drop-down-list/

Tabulator.js editing events cellEdited/cellEditing and row.reformat

Typical usage (and my case indeed) is to create Tabulator table with several editable columns and several calculated columns (with calculations via cell formatters)
When cellEdited occurred after a Tab key used to process to the next cell, I need before to reformat row with new calculations, so calculated columns will show updated results.
But row.reformat() removes cells and recreate them in a row, so navigating to the next cell fails with exception, and editing fails.
Perhaps a callback after cellEdited and before cellEditing is needed (just before navigating to the next cell, for example), so navigating after row.reformat could be done without error
So my question is: how to show reformatted cells of calculated columns just after cellEdited ?
You shouldn't need to call the reformat function at any point. in the cell edited callback you should call the update function on the row component to update any other cells that need to be changed.
I wouldn't recommend using formatters for calculated values because they will have exactly the same issues as you are describing.
You should base them on actual values in your data and use mutators to create the calculated values for these cells. This has the added bonus of making the calculated cells sortable as sorting is carried out on the underlying data not the visual data shown from the formatter.
Checkout the Mutator Documentation and Row Componenet Documentation for more information

Buttons to change cell reference in Excel

I have a list of 500+ entries with customer data and we possibly want to change the ID number for the customers, and to make it easier to work with I wanted to create an interactive spreadsheet that display one customer at the time.
So in a new spreadsheet I want to display the customer from the first row, and then have a button that change the references in the cells to instead display the values from the second row, then the third row etc.
Please have a look at the attached pictures since I think they will explain the desired outcome better, and let me know if you don't understand what I mean.
Thank you in advance for your input!
BR,
Eric
Customer list
Interactive part with buttons
Expanding on my comment. From the Developer tab, choose "Insert" and pick the Spin Button from the list. Put it on your second sheet. Then right click the Spin Button you just added and go to Format Control. In Cell Link pick a cell on the second sheet (somewhere you can hide it). The you can use this value an in Index() formula to look up values from the other page.
As an example, I have three rows and two columns that I want to "Display row-by-row using a button". These are in A1:B3. I am displaying values in Column E using the formula shown in column F. Which are based on the value 2 which was chosen by hitting the up/down button on the Spin Button.
If I hit the "Up" button on the Spin Button that yellow cell changes automatically to 3 and the formulas adjust:

Cognos 10: restrict the items displayed in a value prompt based on the criteria in another value prompt

I'm trying to find a way to restrict the items displayed in a value prompt based on the criteria in another value prompt
I have a report where the row and column values are dynamically selected using radio button value prompt:
Row Values
Nationality***
Domicile***
Fee Status***
Previous Institution
Sponsor
Column Values
Academic Year
Level
Stage
Nationality***
Domicile***
Fee Status***
School
Department
Course
The starred values occur in both lists.
I'd like to be able to hide, for example, 'Nationality' from the Column Values if it has been selected in the Row Values.
Can anyone suggest a way of achieving this?
Set the column value prompt to cascade from the row prompt and set the Auto-Submit property on the row prompt to 'Yes'. Use the following filter in the query feeding the column prompt:
value <> ?rowParam?
...substituting the name of your data item for value and the name of your row parameter for ?rowParam?.
The query feeding the column prompt will output all values except the one selected in the row prompt.
It's not the most elegant solution but I've achived this using render variable. Essentially, I'm displaying a different prompt control based on a variable which looks at the other prompt control.
Would be keen to hear if anyone has neater solution!

how to call associating values to drop menu choices

i have a table in exel
column 1 = bolt sizes in imperial values
column 2 = bolt sizes in metric values
now a called the column 1 ''bolt_size'' and created a drop menu where you can choose between all the different possible sizes (in imperial) but as for the rest of the sheet i need the metric values.
what i have been tryinh to do is once the choice in selected in the drop menu, the second value (the metric one) appears in a chosen cell where the rest of the sheet will call that value for further calcuations.
I have sucessfully made that cell display 1 - 10 (when choosing from the drop menu) instead of the actual values associated with the bolts.
Please help guide me in the right direction
If this is a Form Control/ Combobox, and you have specified its Cell link, then it will display the index number of the selected item, rather than the actual value. In a cell enter the following formula that uses the linked-cell's value to retrieve the text from the input range:
=INDEX(C2:C4,D6)
C2:C4 is the Input range and D6 is the Cell link.
If you are not using a Form Control then you'll need to clarify your question.

Resources