I am working on an add-on for the new google sheets and seem to have hit a problem. I am dynamically generating x number of checkboxes for a user to select. When the user selects some boxes and submits, I am submitting this data to a server handler. However, I can't find a way to get out which checkboxes were selected as I don't know their names. The names are dynamically generated and represent of the ID of the content to retrieve for the user.
Is there any way to find out which checkboxes have been checked on the server side when the name of the checkboxes isn't known?
When you are setting the element's name, set the id to the same as the name and ensure each checkBox has a click handler. Then use:
var source = e.parameter.source;
which returns the id of the clicked element.
The examples given by Srik and Serge insas in response to this question should hopefully help you. There are a few similar posts. Just search for "e.parameter.source"
You'll also find info in the docs here.
Related
I need assistance with something which I have not been able to find through searching this site or even via Google.
I currently have an SSRS report which has a dropdown list that is immediately populated upon loading of the page.
Due to the extensiveness of this list, I have been asked to add another paramater to the report - a text box that would allow the user input and further "filter" the already-populated dropdown list.
By adding this feature, it would allow the user to narrow the contents of the dropdown list, if the user already knows what value he/she is after.
Now this is where I'm getting stuck... as far as I am aware, you can only have one dataset that is able to provide the data of any given paramater (in this case, a dropdown list). So how do you repopulate a dropdown list, that has already been populated?
Any assistance with this would be greatly appreciated.
EDIT: Please note that the only code driving this report are SQL stored procedures. This report was created using Visual Studio 2013.
Thanks.
Use a second dataset in order to populate your dropdown. In the second dataset, simply take your sql query and select distinct in a group, then you can use the second dataset as the dropdown and tie it to your column that matches.
We have one Document Library with some set of columns like Type, Name, Active.
We have already configured the SharePoint Fast Search to search the content in the site.
When I am searching with any particular keyword that showing the result as expected.
We got requirement that need to exclude the content form the doc library when the column “Active” is set to ”No”.
Could you please suggest me how can I add crawl rule for the particular doc library.
You are asking to fulfill this requirement using crawl rule. But crawl rule is generic for the content source and it will effect all the content source which is not recommended(and also not possible) for excluding some result depending on item values. So I like to solve this using scope which is described below.
For excluding that, first of all you need to add new managed property for the column "Active".
For that go to search service application-> Managed Property-> New managed property. Give property name and map it to the field "Active". Also select the type of the field "Active". Tick the box for allow this property to be used in scopes.
Then go to corresponding scope-> new rule-> choose property query
then choose from "Add property restriction" corresponding managed property name(property name given by you during managed property creation) and "=" "No"(please use exact field value of the document library), then choose Exclude and click "ok".
Add this scope in the search page and run full crawl in the central admin.
I hope this will fulfill your requirement.
I am creating a program that for simplicity's sake records the name of a staff member that receives a phone call. This program is designed to show old entries along with creating new ones.
The problem is that I want a user to only be able to select a listed name from the drop box when creating a new entry. But this list will only show current employees. Yet, when viewing older calls this combobox field also needs to display former employees that took a call that may no longer be in this list.
As far as I can tell with the Microsoft control and properties there is only 2 options that relate to this matter.
DropDownStyle as DropDown or DropDownList.
When using DropDown the user can submit any name (which is not wanted).
With DropDownList the user can only submit names on the list, but when browsing through old entries any names that are no longer on that list will not appear on their respective calls (which is also not wanted).
I'm aware I could end up having to implement my own combobox class but I wanted to see if anyone knew of a more elegant fix that combined both of these functionalities. Thanks!
It seems to me you have two modes. Add mode adds a new call record, while view mode displays old records.
Use the drop down list to restrict the user to what you load. When in Add mode, load the control with only current employees. When the form is in view mode, load with all employees.
Use DropDown. In the Validating event, set e.Cancel = True and instruct an ErrorProvider control to put up a warning with its SetError method if SelectedItem Is Nothing, but clear the error (by passing Nothing to SetError) otherwise. Then, in the combo box's SelectionChangeCommitted event, call the form's Validate method.
When deleting records within the platform, this action is not reversible via the front end. Is there a way to allow users to remove a record from their view without actually deleting the record?
You can simulate recycle bin functionality within Archer GRC by adding a record permission field that grants read access to "Everyone". If read access is no longer required then an editor of the record can go in and change "Everyone" to a group called "Recycle Bin."
Please note that if there are other record permission fields in the application, users or groups may still have access if they are selected in those fields. Perhaps You can set up a dropdown status field for the user to select "Recycle Bin" and use this condition for automatic record permissions to revoke permission to the record depending on the requirements or workflow of the application.
Solution shared by Igritte might be somewhat confusing for end users.
End user will see greyed out "Delete" button in the top toolbar, but he has to select "Recycle Bin" in the form. This solution was not accepted by my business owner at some point.
As a work around for "Soft delete", I wrote a custom object overriding "Delete" button functionality.
1. User doesn't have delete access to the record, so JavaScript code will make "Delete" button look like active and available.
2. Once the button is clicked, custom object will populate value in the
hidden value list and simulate the click on the "Save" button.
Update: Note that Custom object needs to hide the value list first once the page is loaded. Here you will need to use a JavaScript and do the following: [a] locate the value list DOM object and [b] set display attribute to none. I used jQuery library to do both. This way your value list is not displayed, but you still can use it to control data driven events.
3. With hidden value populated and submitted, record permission will hide this record from the end user.
Note that custom object hides one value list on the layout as well.
If for some reason JavaScript doesn't load properly, user simply will not be able to click on the grayed out "Delete" button.
Update: Hidden value list can be populated by custom object using JavaScript code as well. You need to identify the form tag "input" in HTML code of the page and set attribute "value" to the desired state. I used jQuery library to do this as well.
I have this solution in production working fine with IE11, FF and Chrome.
I can't share the code, but with WC3Schools JavaScript guides and 4 hours you can write and test it yourself with very little JavaScript skills.
Sometimes you have to use custom objects when you want to get a user-friendly solution of not available functionality.
Good luck!
I have Cocoa Bindings working with a NSComboBox that shows and autocompletes values based on a Managed Object Context. My issue is trying to get the current selection after the user either selects from the dropdown or the autocomplete text is used. I know that the Array Controller class has a selected objects property, but when I try to use it to pull out the selected object I get nothing. With a NSComboBox do I have to set the selection once the text/selection of the combo box occurs or is there something I'm missing setting up the Array Controller.
Thanks
A combo box allows any arbitrary string to be entered, right? (You're not limited to the items you can autocomplete, unlike a popup menu.) So it doesn't have a concept of selected item, since the text in it might not correspond to any item in your database.
This question seems to address a similar issue, declaring it to be unsolvable using only bindings, and links to a blog post that has some hints on what code needs to be added. The gist of it is that, when the user finishes editing the combo box, you create your own fetch request in code and use the response from that to link up the model.