I know how to create Custom Fields in a DataSet for a Report in DecExpress XtraReports.
But I need to Declare a Custom Function in available function list for Calculated Fields. I do not know how to solve this problem.
source type : Date
result : Date String In other Calendar Formats
source type : TinyInt (Enumeration)
result : Custom Enumeration Value Name
As per Q232469 and S132091 it isn't supported without using Scripts. However in saying that the Expression Editor does allow for Custom Functions as per Implementing Custom Functions I would look at this sample How to: Implement a Custom Criteria Language Operator and see if it does what you need.
Otherwise the suggestion is to add a Calculated Field then in your Script override the returned value of that Calculated Field see Calculated Fields
Hope this helps
Related
Made a script for updating a wp post custom fields. All works fine for the fields with type text or number but a I have issues updating the field of type PostObject that contains a select list. Can not find any info on the format of the argument that must be passed to the update_post_meta() in order to update the selected value in the WP database of type PostObject.
For now the post id is static just for testing. And do not take into consideration the field name of the $_GET[] const. It is related to a other custom field. It is just given to see structure of the script.
My script test version I use tot change a specific custom field.
The select where I ge the value from. It returns a string.
Options of the field I want to change from user input.
Plugin name:
Found the solution with the trial and error method :-))).
So, in case you are modifying a custom field of type PostObject, you have to pass as the 'value' argument the ID of the post you want to be the new value of the custom field:
update_post_meta( 15896, 'specialita', '208' );
Thus, in this case the old post ID was for example 325 and and we replace it with a new post with the ID 208.
I need to create an EDT that will use DimnesionValuesLookup.
So I've made an EDT with reference to my View that has DisplayValues for my specific dimension type, also I set formHelp property as DimnesionValuesLookup. And when I'm trying to open lookup on query search criteria I get an error:
Form should be called with parameters
I looked into the Init() method of DimnesionValuesLookup and found out that I need to pass DimensionAttribute as a record.
How can I do this?
Your comment did not answer my question, but I'm assuming you have a way to identify the name of the attribute for which you want to lookup values. Using the name you can select the DimensionAttribute record that you need to call the lookup form by using the findByName method of table DimensionAttribute. After that you can call the lookup form. Standard AX does something very similar in form DimensionValueInterval, take a look at the lookup method there.
I'm trying to work with the bundles :
https://github.com/lexik/LexikFormFilterBundle
https://github.com/stephanecollot/DatetimepickerBundle
So I've a filed of my form with to apply a filter acordin to this field
->add('fecha', 'filter_date_range');
Now I wanna add another parameter because this field is a data then I wanna see a datapicker so I need to apply another parameter here like
->add('fecha', 'filter_date_range collot_datetime');
But this not works so, are there some way to implements the both bundles in a field?
This can not be done out of the box - field can have only one type.
If you need to customize form field type you can create your own: http://symfony.com/doc/current/cookbook/form/create_custom_field_type.html (based on these two)
Context: Content type Person has reference (multiple values) to a content type Work, using entity reference.
Need: To display the title of each person node which references a given work, separated by a comma.
Done: A view with a back reference, the right nodes are fetched. (Views 7.x-3.7)
Problem: Cannot display the value separated by a comma. Note: I usually do it with the "Simple separator" display type which is under "Display all values in the same row" in the MULTIPLE FIELD SETTINGS field group. However, this field group is not available in my context.
Solved
I have found the module Views Merge Rows - works very nice. If it does not support Features module for some reason, I can take some of its code code in order to use hook_views_pre_render myself.
I was able to work around this problem by using token_formatters. The basic steps (after token formatters is installed):
No relationship to referenced entity in views (not needed)
Add the entity reference field to the view
Change formatter to "tokenized text"
For 'Text to output' use a token (I'm using [node:field-name])
For 'link destination' use a token ('m using [entity:url:path] for a relative link)
Set multiple field setting as desired
You need a custom views Format here because you are talking about the whole views-row not a multiple results field. You can use the "Unformatted list" and add a comma to be added with CSS or JS.
What kind of Relationship do you use? Can you export your whole views in an external editor and provide a link?
I had a similar issue, where I was using the Entity Reference relationship of "Referencing Entity" instead of "Referenced Entity". (The reference was on the child and the View started at the parent level).
When you run a Drupal System Message on the row (dsm), it returns all the nid responses appropriately, but as different result rows instead of as a single object; however, since the NID field (like many others) has no option for display multiple results, it would only grab the first result.
I ended up having to do an Entity Query from a Views PHP field with the current row's NID as one of the Field Conditions. That seemed to do the trick, rather than trying to load a View inside of a View with views_field_view.
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node')
->entityCondition('bundle', '[your_content_type]')
->propertyCondition('status', 1)
->fieldCondition('[your_field_machine_name]', '[field_column_to_check]', $row->nid)
->addMetaData('account', user_load(1)); // Run the query as user 1.
$result = $query->execute();
I had a very similar problem: no "Multiple Field Settings" were available in the field configuration of a multi-value entity reference from my content type to User.
Solved it by removing the entity reference and instead using the multi-value "User ID" field of my content type directly. The "Multiple Field Settings" form area was available now and I selected "Display all values in the same row" there as you do normally. Now this would only display numeric user IDs separated by comma (not desired). But in the field configuration there was also a setting "Format:", which I set to "Label". This would display user names instead.
So I guess by creating a custom formatter you would be able to display your associated "Work" entities in a similar way.
Is there a way, in Axapta/Dynamics Ax, to create an Extended Data Type of type integer which only allows enering values in a specified range (i.e., if the extended data type is meant for storing years, I should be able to set a range like 1900-2100), or do I have to manage the range using X++ code?
And if I need to use X++ code to manage the range, which is the best way to do it?
I suggest you use the ''validateField'' of the corresponding table.
Search for the method in AOT\Data Dictionay\Tables to see many examples.
You can can't specify the range on the extended data type itself. If the type is used for a table field, you can add code to the insert and update methods of the table, in order to validate the value whenever the record is updated. This approach could however have a cost in terms of performance.
You can also choose to just add code the the validateWrite method of the table, if you are satisfied with the validation only taking place when the value is modified from the UI.