Why are checkboxes getting cleared when I edit my entries in Safecracker?
Add the parameter
preserve_checkboxes="yes"
http://expressionengine.com/user_guide/modules/safecracker/index.html#preserve-checkboxes
Related
When I click the first item in a multi-select listbox the first click triggers the clicked item as well as items around it.
Many selected
I dug into why and added code to listen to the listbox selection changed event, adding only the selection changed listener and no code made it go away.
Private Sub AllListBox_SelectedIndexChanged
It comes back every so often. Maybe it has to do with the multiselect.
The values are added programmatically by looping through every header on the page and adding it as the value.
Dim InList As Boolean
For Each col In Range(DataRangeBox.Value).Cells
'Find the row with the headers on it
If col.row = Range(DataRangeBox.Value).Cells(1).row Then
'Add item to all available list box
If IsNull(AllListBox) Then
AllListBox.AddItem col.Text
End If
End If
Next col
Is it similar to the problem discussed here. Will adding the index explicitly solve the problem?
One selected now
Solved my problem.
On the listbox properties there is the attribute "Multiselect" and I noticed that it was on "fmMultiSelectSingle" when I was getting the problem. I knew I put it on "MultiSelectExtended" as its setting when I created it. So I played with it and once I had it on the one I wanted, I didn't see the problem. I could also reliably reproduce it by making it "fmMultiSelectSingle".
I'm having the same problem described: Usually, the first time (only) clicking an item in a listbox, I see 4 items selected (one clicked and 3 below it). For me, the listbox's Multiselect property is properly set to MultiSelectExtended so not what was described above. I've confirmed no code is setting the listbox property otherwise and I've tried manually changing the property to Single and then back to Extended but the problem persists.
I have my problematic listbox on a tab. After opening form/screen, user works in one tab before clicking on this other tab. (When going to this tab with listbox, some brief code runs.)
MY SOLUTION:
Today, I decided to add code to use SetFocus for the listbox after user clicks on that tab (at the end of the brief code that currently runs). So focus is on the listobx before I click any item in the list for the first time. This fixed my multiselect issue! Now, only the item clicked in list is selected, correctly.
I hope this idea helps someone else experiencing this quirky problem.
I have a custom SharePoint 2013 list (which started as a SP2010 list) with roughly 2,000 items. It was recently brought to my attention that I am having a strange issue with a check box/boolean type. I can't recall if it was originally created as a Yes/No column in SharePoint before the web form was created in InfoPath.
The field name is Report Received. Up until now, and only for troubleshooting, the checkbox was never actually on the form. I had a rule where if a question was answered, the field value was set to 'true' in lowercase without quotes.
If I create new item in the list, the checkbox works as expected.
If I attempt to edit a previous item that the value was already false, I get a validation error upon save, that states that only 'true' or 'false' is allowed.
In conclusion, I can only assume that for a period of time, something was buggy in my rule/form/field.
My goal is to either set that field to blank on the items, or fix the assumed corruption in the field on those items.
Fortunately, I don't have many items to fix.
One idea i had was to create a view called "Test".
On that view i dragged the Report Received field on the form. I also added a calculated field below it which shows me the current value of the field, and 3 buttons, each with a rule, to either set the value to blank, set it to false (lowercase), set it to true (lowercase).
I then opened an old item that is giving me the error, to test my new buttons.
My first observation is that the calculated field indicates that the value is currently false (lowercase)
Unfortunately, when i click any of them, i instantly see that the checkbox turns red, indicating that only 'true' or 'false' is allowed when i mouse over the checkbox.
The strange thing is that my calculated field indicates that the value changed to TRUE in uppercase, even though the box is unchecked.
I am noticing this before attempting to save the form.
If I create a new item in this list, and go to my "test' view, the buttons work just fine.
While InfoPath seems to prefer true and false, the value in the SharePoint lists are Yes and No.
Any ideas how I may be able remove the corruption on these older list items, without deleting and recreating them?
I am currently using InfpoPath 2010 to edit the form.
Thanks!
I am kicking myself. I ran Rule Inspector and saw that a rule i was not aware of was causing my issues. I deleted it, and now everything is working as expected.
Thanks for the info. I was experiencing the same thing and was able to find my error as well by using Rule Inspector. More specifically, my issue was being caused by a rule running on the "submit" buttons that set the checkbox or boolean field to "Yes" to match what was in SharePoint. I found that you have to actually use the formula (fx) field in InfoPath and enter boolean("true") as the formula to get InfoPath to pass the value correctly to SharePoint!
In SSJS I'm looping through document in a view and I want to add a new option to a hidden combo for each document and once finished then show that hidden combo.
I've tried building an array with value|string and adding that to the getComponent("apm").setValue(myArray), but no luck and how do I grab the combo and make it visible because dojo.byId("#{id:apm}").setRendered(true); gives error about dojo not found, so do I need to include something?
Any ideas?
Add your array to a viewScope var.
In your combo, add a formula value and point it to the viewScope.
After your array is built make sure the combo is refreshed. You can set the rendered property based on whether or not your viewScope var exists.
When I add a row from "Create.jsf" page and I go to "List.jsf" to see the datatable I get the same result before adding the row.
I have two solutions :
1 - I must clean browser cache everytime I want to see the new row or add a button to update the datatable.
Or I change the Controller from SessionScope to RequestScope (it works but it's not a good idea because it takes a lot of time to load the list everytime).
any other solution please ?
Thank you :)
Is there any Lotus formula which can be used on an action in a view , for deleting / erasing some specified view' rows? Thank you
You can add a button that uses the Simple Action called Delete from database. It will delete selected documents.