default values to hidden fields - sharepoint

I created a content type that uses a CheckBox that has a default value. When I save documents of that content type the default value behaves as expected. If I make that checkBox hidden and create a new document with the content type it is not assigning the default value. When I look at the XML results from a search that returns all documents in that content type the document created with the hidden field on it doesn't even have a node for the hidden field.
Is there something special that I need to do to get the hidden field to take it's default value?

It's not exactly the answer of your question. But you can make it a normal (not hidden) column, and hide it from the forms with a simple JavaScript code. You can add a content editor Web part to embed the necessary JS code to the form.

Related

Changing the Type of the Custom field

How can i change the Type of the Custom field in Acumatica?
I created a new custom field of "ComboBox" Type for the Sales Order Header Section.Now i would like to change its type to "TextEdit" so the user can manually enter any value in it. So far there are only few Sales order where user has entered the value in this field.
Thanks
Combo boxes are stored in string fields in the database - you can therefore easily replace the control on the page with a text edit field. The simplest way is to remove the combo box from the layout editor, and then adding it back as a text box from the "Add Data Fields" tab. If you want to modify the properties of the field itself, you have to go to the Data Access section and modify the attributes of the field (PXDBString + remove PXStringList attribute if you have one). Lastly, if this is a field you were creating as part of your customization project, you might have to manually edit the Table node of the project XML (File -> View Project XML)

Gravity forms - merging values

Need some help with Gravity forms. I need to have a field, that is a merge of values ,that user has previously selected.
So, if a user has selected 3 different fields wth values of 1)XYY, 2)YYX,3)YYZ I do not need a sum, just a plain merge, in form of XYY.YYX.YYZ, or anything like that.
Could that be acomplised with some merging tags, or dynamically population?
Thanks
Of course;
You should create two different forms.
Collect data with field1-field2-field3, they can be single line text, number, date or anything. In the advanced tab of field settings, write a parameter name for each one, like field1-field2-field3.
In the second form create a single line text, in the advanced tab of field settings check "dynamically populate field" and write your parameters like field1.field2.field3.
In form1 settings->confirmations->redirect URL line, write your form2 page url where you added form2. Select "Pass field data via query string" and add your parameters like field1={fieldname:1}&field2={fieldname:2}&field3={fieldname:3}
When you submit form1, your form2->single line text field will capture the parameters as you wish.
This is possible with Gravity Forms Populate Anything by...
Add whatever type of field you'd like to use to capture the combined.
Set the Default Value to the merge tags of your 3 fields: #{Field A:1}.#{Field B:2}.#{Field C:3}.
That's it.
Edit: Updated screenshot for Gravity Forms 2.5 and updated merge tags to use the # to make them "live".

checking if current user is author of the document

I have a formA where I have a field '_author' which is of type Authors/Computed for display with value (#Subset($Updatedby;1)). I display information from formA on viewA. What I want to achieve is that documents that are created by you are only visible to yourself on viewA. I tried the following formula in viewA 'View Selection':
SELECT (form = "formA" & #UserName =_author). Even though I know that these two variables have the same values when I read it from the document's properties, the condition is not satisfied and I do not see a single document. If I delete everything after "&", the view shows all documents.
All is hosted on a server which handles users.
A handy workaround is to create a Page with an embedded view. This view is exactly like your view but has an additional first categorized (!) column with your field _author.
Put into embedded view's property "Show single category" the formula #UserName or #Name([CN]; #UserName) depending on how your categorized column _author is formatted. Show then always the Page instead of the view.
This way you avoid trouble with "Shared, private on first use" views and users see exactly their own documents only.
#UserName works in a special manner in selection formulas in views. In your case the view should be Private on First Use. Read further here: http://www-01.ibm.com/support/docview.wss?uid=swg21089773 .
Be aware that this lead to all sort of issues, e.g. when you update the design of the view users must remove the view manually to get the changes deployed.

Check if Field is of Type Rich Text with #Formula

I need to check if a field is of type "Rich Text" using #Forumla in a View. How can I achieve this?
Alternatively, check the byte size of a field also using #Forumla in a View.
You can turn Rich Text into plain text using the #Abstract formula, and then display that in the view. Unfortunately #Abstract does not work in views.
If views themselves won't get the job done, you can always use an agent to process the documents and set a document item value, which in turn can be shown in a view. It's an extra step but often can get the job done. Using LotusScript you could loop through all the document's items and check if they are a RICHTEXT type, and then stamp the document with an "IsRichText" item set to "Yes", for example.
Formula language will not show these values. The closes you can get is #Length. If it is possible in the design, calculate these values is a separate field using lotus script.

Preset the jqGrid filter text box through code

We are using jqGrid for ASP.Net version 3.6.6.0. We are facing a problem in search/filter as described below:
We have created a jqGrid using ASP.Net (C#) having column likes Name ,Status etc. There is a hyperlink on Name column.
We are able to successfully populate the grid
User applies search on a column say “Name=’XYZ’” and grid is updated according to search results.
User clicks on Name link and is taken to details page of that Name.
Now when user clicks back from that details page ,search is lost.
We were able to persist the searched grid details using session however we are not able to set the searched text back in search text box.
i.e we are not able to set the value “XYZ” in search text box of Name Column.
Need your help in knowing which property or method is to be used to set the Filter text box through code.
If you use Advanced Searching the searching parameters are saved in the postData.filters property in the JSON encoded format. If you use the Single field searching another properties of the postData parameter of the jqGrid save the filter information: searchField, searchString, searchOper. So what you can to do is to same the filters in the cookie. To restore the searching filters you can examine the cookie and if needed extend the postData parameter with the corresponding properties (see here for details).
If you want that the searching filters will be not only displayed if one opens the Searching Dialog you can set additionally the search:true parameter of the jqGrid.
I recommend you additionally read the answer on the close question.

Resources