How to use view parameter "Keys" for date fields at Domino Data Service REST API - xpages

Domino REST API doesn't return any view data if I use date at query parameter "Keys". In case of Extension Library REST Control we can use NotesDateTime() or #Date() to make it work.
But I don't know how to use the same at Domino REST API call. Anybody knows how to use date as key?
This is the the sample url,
https://demodomain.com/demo.nsf/api/data/collections/name/viewName?sortcolumn=DateField&keys=1999-03-24T22:16:17Z

I looked at the source code for the Domino data service. The view entries resource (/{db}/api/data/collections/name/{view}) always assumes the keys parameter is a string. So apparently it's unable to match any value in a date column.
This behavior could be improved. Meanwhile, you could work around the limitation by creating a separate sort column with the TEXT representation of the same date. Use the new column name in the sortcolumn parameter and the view entries resource should be able find rows that match the keys parameter.

Related

Custom timeframe date range in azure workbooks as json body

Unable to pass custom timeframe date range from json body using azure resource manager data source
this is the way I have tried to get cost details using time range, it works if I pass static values, but fails if it passed from a parameter.
in the screenshot, you have timeperiod with a lower case p, but in the cost management API docs for /query it shows it being timePeriod with a capital P. its strange that the docs don't explicitly state what the format of the string should be?
by default workbooks would format that as JSON dates, but you might need to use {TimeRange:startISO} or `{TimeRange:startUnix} or something if it is expecting some other format?

change value of one field on the basis of other using spfx field customizer

I have a field name called Security(choice field) and other field name is Sensitivity. I want to copy the values of Security in Sensitivity in the list view. For example if value of security is Internal then in sensitivity column also it should show Internal in the list view only irrespective of the values stored in sensitivity. In laymen term Both field should show same values. I am new in spfx environment. Please help. I am using react framework. Let me know if you need any other details.
PS- I have 400k libraries consisting same column with same internal name so column formatting option is not suitable. we need o deploy as an extension so that it will change listview across all libraries.
In SPFx Field Customizer, implement the onRenderCell with below logic:
The method has signature as follows:
public onRenderCell(event: IFieldCustomizerCellEventParameters): void
Use below code to get the Security field value:
const securityValue = event.listItem["_values"].get("Security");
Once you get the item id, you can get the value of other field from same item.
Return the value as:
event.domElement.innerHTML = `<div>${securityValue}</div>`
Source: change value of one field on the basis of other using spfx field customizer

Can I use any other column name than id in my xamarin forms app?

As the title suggest, I was wondering if it was possible to use any other column name for the index than id?
The documentation for creating a Mobile Backend in Azure and Xamarin Forms app stipulates that the index column must be id all lower case for the API to return data. What if your index column is called something else, for example idx_index.
My issue is that my database already exists and there are a lot of tables. I'd like to avoid having to rename the index columns in the database if I can.
Is there anything I can do that would help me avoid this problem or does it look like I'll need to rename my columns to id?
No - you cannot use any other name other than id. This is in-built into the SDK and you would need to alter both the server and client SDKs (and compile new ones) to support something else. This is a non-trivial update.
Since my database already existed all the column naming was set. To get around this problem when it came to Azure and it's expectation of a column called id I simply cast the column names in some custom views which were specific to my mobile app. For example:
SELECT index_idx as id,
name,
location
FROM mytable

Google Search Appliance querying date meta field with given range

I want to send a query to the Google Search Appliance that includes date range criteria of a meta field (lets call it metaDate). For example: metaDate field between 01.01.2010 and 01.01.2015. How can i construct a query such like this?
Mohan's not entirely correct. You can perform range searches on any metadata attribute. This is different then the document date. See Google's Documentation for this.
Also you can create a dynamic navigation element and test the format yourself. Dynamic Navigation can be used to construct range searches.
You have to tell GSA to use metaDate as Lastmodifieddate either by adding it as Last-Modified response header or by configuring Document Dates in GSA admin console for metaDate. After the changes, reindex your documents and fire a date range query along with the query term.
For example, q=someterm daterange:2010-01-01..2015-01-01

Finding Lookup item numerical values in MS Dynamics

I have a site powered by ExpressionEngine 2.5.x, using Freeform, integrated to post form data to MS Dynamics CRM 2011. The extension is nicely scalable, I can change the mapping, all that excellent stuff. My problem is how to find mapping values for Lookup fields in MS Dynamics.
I am trying to map form fields from the site forms, into MS Dynamics. Some of the fields are Lookups, in MS Dynamics. Our mapping calls out the numerical value of the Lookup item, rather than its name. (Which is good, because ppl can change the text names in the MS Dynamics console without breaking the mapping.)
My question is: I know how to find the actual back-end field names of form fields within MS Dynamics. But how to I find the numerical values of the picklist items and lookup fields? Say I have a Lookup field, for Lead Source (called campaignid). The items are:
web
online
radio ad
flyer
word of mouth
other
I know that when I edit options in an option set, I can see their numerical value. Where can I edit options in a lookup field? I've tried looking under Settings > Customizations > Customize the System, but didn't see anything called lookup.
Lookups are pointers to entities. They do not have numerical values like regular option sets. So I guess that you will have entity called Campaign (or lead) so you can check which campaigns exist in the crm DB where each entity will have view in the DB.
Let's see if i understand your question. You don't have a Lookup option like Option Set because a lookup is consequence of a relationship 1:N between two entities. So for edit a lookup you need edit a record of a entity. In lookup fields you don't have numerical values, you have guid that represent individually a record, so in a record a lookup is stored in database as a guid. Check this video.
Check here how find this guid with the record open.
A look-up field is, roughly speaking a pointer to en entity (in C# it's referred to as EntityReference instead of Entity) and it consist mainly of a guid and logical name of something.
Usually, in the code, when you have an entity, in order to access the fields of its lookup-connected entity, you'll need to make an extra query for that.
So, if you have a Contact instance and need to see the address of its parent customer, you'll have to get the guid and logical name (in this case it'll be Account) and retrieve the data for it separately.
EDIT:
Suppose that you have created an instance of Contact entity and you'd like to access its lastName field. Then you can simply refer to it as follows.
var value = Xrm.Page.getAttribute(“lastName”).getValue();
On the same form, there's also a field that refers to an Account instance (its name is parentCustomerId. Suppose now that you'd like to get the fullName field of the Account. One could expect the following to work.
var account = Xrm.Page.getAttribute("parentCusomterId").getValue();
var name = account.getAttribute("fullName").getValue();
However, that's not going to work, because the parentCutomerId is a look-up field. It means that it only contains a guid (a pointer, a reference) identifying an other entity. You'll have to use it (the guid) in order to fetch the instance that the look-up is "mentioning". Then you'll be able to check it's properties.

Resources