Lotus Domino data as JSON - Propertie Names - json

I have created a custom view in my Notes database. The view has its own column headers.
Now when I get the JSON output, the object looks like this.
"#href":"\yourdatabase.nsf\/api\/data\/collections\/name\/MYVIEW\/unid\/FF235B724095ADDAC12585F300453467",
"#link":
{
"rel":"document",
"href":"\yourdatabase.nsf\/api\/data\/documents\/unid\/FF235B724095ADDAC12585F300453467"
},
"#entryid":"1-FF235B724095ADDAC12585F300453467",
"#unid":"FF235B724095ADDAC12585F300453467",
"#noteid":"1B752",
"#position":"1",
"#read":true,
"#siblings":761,
"#form":"Person",
"eName":"Doe",
"eNAM_D":"John",
"eAddress":"Mr.",
I had thought that the property names come from the column headings.
as an example:
"Name":"Doe",
"Forename":"John",
"Address":"Mr.",
instead of
"eName":"Doe",
"eNAM_D":"John",
"eAddress":"Mr.",
Is there a way to set the properties yourself?

The name used as the property name is the programmatic name of the column (check the last tab on the column properties dialog box).
This is usually the field name if the column shows just a field. It is a computed unique name e.g. $21 if the column shows something other than a field.
You can change the name of a column that does not show only a field.
In your case, you are showing a field called eName and the programmatic name is eName. You can't change this.
You can however change the column to be a computed value that isn't just a field e.g. "" + eName and then change the programmatic name. Do not change the programmatic name to the name of another field in the database.

Related

Issue with form property in expression builder - MS Access 2016

We have a form where one of the fields needs an expression.
When we are building that expression, actual need is to select the column name, but we see that there is a property coming up along with the column name with the same name.
Even if we select the column name, when we save it, it is automatically being changed to form property which is causing the issue in the result.
We want an expression like this: =IIf([SNAME]="FC";"FC";[STUDENT])
But when we save it, it is being changed to: =IIf([SNAME]="FC";"FC";[Student])
STUDENT is a column name which we want to be in the expression
Student it is shown as a form property in the suggestions but it is not there in the property sheet, we don't know where it is being defined.
Please check the below screenshot, where you can observe all the above points mentioned
If Student is the name of the form, you may try:
=IIf([SNAME]="FC";"FC";[Forms]![Student]![STUDENT])
From the looks of the screen shot, you have a table named [STUDENT] and a form named [Student]. Check your navigation pane and look for the table and form with the same names, or on the navigation pane, type in the search student and see if it gives you 2 objects.
But if you want your formula to work, try:
=IIf([SNAME]="FC";"FC";[TableName]![columnName])

SSRS Multiple Parameters in a single dropdown

I have a report I need to develop where all Quotes should be listed where a specific Product is present. The product can be identified based on Product ID/Price/Product Name etc. I was looking to develop one report where all there fields are present as part of a dropdown. When the user selects one value such as Product ID and enters a value in the text box next to the ID, the report is filtered on this parameter. If the user selects name, the name can be entered in the text box and the report is filtered based on the Vendor ID etc.
Is there a way to do this? I have the parameters showing up next to each other instead.
It is doable if I understand correctly and here are the steps for achieving your report purpose.
I will use a simple query as an example data set for your reference.
1.Create source and datasets, in this example I skip the data sources and here is the short query for my exmaple
SELECT * FROM Table
WHERE
(ID = #ID or #ID = '')
and
(Name = #Name or #Name = '')
2.Add another dataset named Control, the query for Control is:
SELECT 'ID' as option
UNION
SELECT 'Name' as option
The purpose of creating this dataset is to provide the available values later when you need to choose either name or ID.
3.After step1, you should already have two parameters generated by system, which are ID and Name, if not, create them by yourself and go to each parameter page, DO MAKE SURE CHECK Allow blank value''
4.Create the 3rd parameter called Control, go to parameter setting page, go to Available Values, Choose Control dataset, Choose option (which is the customize column name you set in Controldataset) for both Value field and Label field
5.Go to ID parameter setting page, go to Default Values, choose Specify values, click fx, type this:
=Switch(Parameters!Control.Value="Name","")
Click ok
6.Go to Name parameter setting page, go to Default Values, choose Specify values, click fx, type this:
=Switch(Parameters!Control.Value="ID","")
Click ok
The ID and Name expression are correct, not set wrong
7.Change the parameter order to make Control on the VERY TOP, no matter ID or Name comes for the 2nd, but Control should be in the 1st place.
8.Drag and drop a table, place Name and ID. Preview the report, at this time, only Control will be available for you to choose value, choose either ID or Name to see the difference. When you choose ID, Name will be gray out, only ID light up and type any ID you want, actually, what the system does internally is passing the "" (blank value) to Name, that is why you need to make sure the Name parameter could accept blank value. Same for selecting Name
Update me if you have any run time issue

Howcan I change the visible name of a many2many field?

I am using Odoo8.
I have two models: x_items and project.task.work.
I have a field called name and a custom field called x_wo_ref in the project.task.work.
I have a many2many field x_item_wo in the model x_items which is related with the model project.task.work.
Currently when I fill the field x_item_wo, the field name from project.task.work is showed.
How can I customise it in order to use the field x_wo_ref instead of the default field name for this many2many field?
Thank you
You need to define the _rec_name attribute of the model. _rec_name takes as default the field name and if this does not exist it does not take anything unless you specify it. For instance if you need to see the field phone you must write:
_rec_name = 'phone'
In case you want a _rec_name depending on anything you need to change the function name_get(). You can see examples in other models.

Assigning a default value to a Microsoft Access Table Field?

I have a database table in Microsoft Access. I want to assign the default value of one of those fields to another field that happens earlier in the same table.
I tried the value =[Form1].[AssignedByes] with no luck and the same for =[AssignedByes] but with no luck.
Can anyone help?
The field name I'm assigning the value to is [RemainingByes] and the field that assigning the value of is [AssignedByes].
To get around this problem, I create a Query that basically functions as the table. I use it instead of the table when creating other queries, forms, etc.
I'm guessing that you copy [AssignedByes] into [RemainingByes], because [RemainingByes] will start off with the value of [AssignedByes], but you want to be able to change it later.
So, you can set up the Query with a calcualted field called [xRemaningByes]. You would enter the changed values in [RemainingByes]. Then set up a formulat in [xRemainingByes] that returns the value of [RemainingByes] if there is one, and it not, it returns the value of [AssignedByes].
[xRemainingByes]: Iif([IsNull([RemainingByes],[AssignedByes], [RemainingByes].
When you use the Query instead of the Table, you will use [xRemainingByes], which is the Query's calculated field, instead of the Table's field [RemainingByes].
ANOTHER OPTION ---
Create a field in the Table such as [RemainingByesOverride], and that would be where you hard enter the changing data. Then get rid of [RemainingByes] in the table and only have it in the Query as a calculated field.
[xRemainingByes]: Iif([IsNull([RemainingByesOverride],[AssignedByes], [RemainingByesOverride]
A field's default value is applied at the instant a new record is created. So you can't use [AssignedByes] as the default value for [RemainingByes], because [AssignedByes] doesn't have a value yet.
OTOH, if you've assigned a default value property for [AssignedByes], use that same property for [RemainingByes].
If your Access version is 2010, see whether you can use a data macro as a pseudo-trigger to accomplish what you want.
You could also try binding a form to the table. In the after update event of the control bound to [AssignedByes], you can assign a value to another control bound to [RemainingByes]. This could allow you to do what you need in the form, but won't apply for changes made outside the form.

Can report Parameter name be accessed within report body?

I have a report with a set of input values for a parameter.I have used a drop down for showing the list of input which are basically an id field and a name field.Now when i select one input from the drop down i get the id field which is passed as input for other quarries.
But my problem is that i further need the name field of the selected item in the report body.
Is there any way to do this other that creating a separate dataset and passing the is to that.
Any help will be appreciated.
You can add a parameter value to any part of a report that will accept an Expression field (such as a Textbox, Tablix cell, etc) by editing the expression to be:
=Parameters!ParameterName.Value
- or by selecting the appropriate parameter from the Item pane of the Expression dialog.
You can display the name field (instead of the parameter ID value) by changing Value to Label - like so:
=Parameters!ParameterName.Label