Auto select first option on dependent data validation dropdown in Google Sheets - validation

I have a Google sheet where I’m using a dependent drop down for users to select one option and then select a second option depending on their first choice. I'm doing this using a Filter function on a separate tab as range for the dependent list.
I’m trying to figure out a way to auto select the first option of the dependent dropdown (in other words, to set a default value) when the main dropdown is changed.
I have found scripts for clearing out the second dropdown, but not to select one of the available options. I'm a novice when it comes to writing code and I can’t find an answer on the internet.
Any advice would be greatly appreciated!

Related

Dynamic content display

when I select (say customer) using Dropdown I would want to show users all the properties on a side table or division. Essentially, displaying the selected customer's fields on the same page for the users to verify/read.
I am using laravel-backpack for development and finding it difficult to implement. Any help is greatly appreciated.
I'm afraid there's no existing way to achieve that, you'd have to code it.
But you don't have to start from scratch, you can use the code for the select2 field (or whatever field you prefer) and create a new field type, say select2_and_preview by tweaking the Javascript inside that one file.
There's recently been a Feature Request for a similar feature (see here), you might want to pitch in with your opinion if you want it created by the team, and included in the official build.

Grafana Table Panel 'clickable' and use it to drill down to a more detailed view

Is it possible to have a Table Panel in Grafana, and when you click on a row, it shows a graph from another set of time series?
I see there is a feature request for it, but I'm not sure it's available yet
https://github.com/grafana/grafana/issues/5481
Looking for any suggestions on making the rows in a Table Panel
'clickable' and use it to drill down to a more detailed view (another
dashboard using Template variables). Currently displaying a summary of
several servers as rows in a Table Panel and we want to select an
individual row (i.e a server) to drill down to a more detailed
Dashboard.
Any ways to do this?
Thanks
You can achieve this also in 4.x by defining a link for a table column (in the Column Styles section under Visualization). The link can refer to another dashboard and embed current cell's value (or other cell in the same row) as a parameter.
For example the link Url can be:
/d/c9xaXx5Zz/tree-node?var-datasource=$datasource&var-interval_id=${__cell_1}&from=$__from&to=$__to&var-path=root
In Grafana 6 or above you can preserve the time range filter using the $__from and $__to built-in vars.
The available built-in variables to access cell contents are not well documented, but they can be found by hovering over the (i) icon of the Url in the table panel.
More info on built-in vars: https://grafana.com/docs/reference/templating/#global-built-in-variables
The feature request you linked to is a duplicate of this one which links to this Pull Request. The PR was recently merged so it is available now as a nightly build and will be included in the upcoming 5.0.0 release in September/October.
Drill Down Option can be used from General option from Grafana Dashboard.
Copy the link in the Url of the table which you want to show. Change the items in the variable part which is changing according to the need.It will be of format var-name=value
The link URL works well if you are linking to another dashboard, but it does not work well if you are changing a variable on the same dashboard as it does not auto-refresh.
You can add JavaScript into the URL instead of a link.
javascript:$('a.variable-value-link').trigger('click'); $('span:contains(${__cell:raw})').closest('a').trigger('click');
The JavaScript only works for a single dropdown, it would have to be updated if there were multiple dropdowns. I worked on this quickly, so I am sure there is a better way to use JavaScript to change the variable. It basically opens the dropdown, finds the value from the current row and selects it.

Select a different value in a static dropdown using angular.js

I have a Magento product page producing static select elements, to which the price mechanism is tied in to backend, so i can't touch those dropdowns. I am using an angular.js radio element to recieve user input, which should in turn update the static dropdown's selected option.
I don't know how to link the two, I have recreated the problem here: http://jsfiddle.net/ldn_tech_exec/smBdC/1/
I want the radio button to update the dropdown, but I can only manipulate the dropdown after it has been created, perhaps using jquery to insert any angular directives required.
UPDATED again: Your select list needs an ng-model and the options should be generated with ng-options. When you select a radio button, the controller method you trigger should update that ng-model, which will cause the select list to update.
See http://docs.angularjs.org/api/ng.directive:select
Another way to do this is to use ng-selected. See
http://docs.angularjs.org/api/ng.directive:ngSelected
UPDATE #3: I missed the fact that you can't modify the select list initially. See my fiddle in the comments below for a working solution.
It sounds like you have some product where the price depends on the options set.
If this is the case then updating the drop-down from your radio button is relatively trivial - or at least depending on your prototype/jquery skills.
However there is a gotcha: once you update the drop-down in javascript with an 'invisible hand' there is a whole lot more javascript code to update the price and availability. To do this you need to bubble the event. This doesn't happen automatically if using prototype.
I hoped I could rustle up the 'bubble code' but I don't currently have it to hand, besides, you aren't stuck at that point, yet...

Selenium IDE: I am not able record a value, selected from a dropdown list for my web application using selenium IDE

This is what I am trying to do:
Open my web application
Go to the details page to create a new entity
While creating entity, I need to select some values form the drop
down and record it on Selenium IDE
Did all the above steps, they were recorded into Selenium IDE
When I play back, it is trowing an error whenever it is trying to
run the script, where some
selections from dropdown is needed.
Have been stuck with this for quite sometime now. Tried using "focus", but it did not work as well. Can anyone help in this regards?
Get Firebug
Inspect the element to find out the class ID of that UI Element.
Command: Select
Target: class ID
Value: label=[value in drop down of this ID] For example (label=Hawaii if you're dealing with a state and that is the value in the drop down)
The code where you get that state value would look like this where you use the label.
option value="HI">Hawaii</option
That should do it.
Since I don't know your web application I am going to make a number of suggestions.
Record and replay will not always capture all of the items that it needs to reply. This is a misnomer unfortunately.
Try doing select | locator | itemInSelect
It might be worth adding a waitForX, where X is the item you are waiting for it, call before that in case that select is not loaded when the test hits that point.
I had a similar issue with post code boxes into which you enter a postcode, and then select a Store from the dropdown that appears.
The actions recorded were not completely accurate.
I ended up fixing it by using sendKeys (not relevant to you), pause and click (got the xpath of the selection)

InfoPath 2007 - Populate drop-down list on-the-fly

I'm working on an InfoPath 2007 form. I have two drop-down lists and i need the second to be populated with items bases on the value chosen in the first list. I use c# to populate the drop-dpwn lists from external sources. I've tried to use the OnChange event to make all this, but the second list is still empty.
If anyone knows, please tell me.
You can filter the entries for the second drop-down list based on your first list (but only if the entries are based on a data source, not manually entered).
Bring up the properties window for
your second drop-down list.
Select your data source.
Click on the button to the right of the Entries text box.
Select the repeating node you wish to use for the basis of your list entry.
Click the Filter Data button. From here you can enter a filter to limit the entries displayed based on the value of your first drop-down list.
Your question was a bit ambiguous. You may be trying to populate a secondary data source based off of your first drop-down list. This should work fine with an OnChange event. Can you post the code you are using to do this?
Some additional tips that may help:
The change event will not fire until focus moves off of the list box. So, for the second drop down to populate, you will need to set the first drop-down then hit tab or click elsewhere in the form.
I don't know the size or nature of the data source you are using for the second drop-down list, but you may consider downloading the entire data source and filter it using the method I described above. This may be a better solution as you won't need to make a database query between entering the first list box and the second one.

Resources