In a Sharepoint site: "https://(company).sharepoint.com/sites/(subject)/Shared%20documents/Forms/AllItems.aspx" i see among others the column: "Id". This ID however shows only the numbers f.e. 35.
It does not show the complete number "aadduej-35". The complete number is shown when i open the document properties. There i see "Document-id" with the complete prefix and the id number. How do i arrange that in the .aspx is shown "aadduej-35" instead of "35"
All help is appreciated!
Thanks in advance ;-)
You could create a calculated column and set the formula like this:
=CONCATENATE("aadduej-",ID)
Or you could format the column with json formatting:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": {
"operator": "+",
"operands": [
"aadduej-",
" ",
"[$ID]"
]
}
}
Related
I have the problem that no matter what i do my formatting doesnt work.
my goal is that if ganztägig is true, only the date and the word ganztägig is thair and if ganztägig is false , only the date and the time is thair. I tried everything but its not working.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if([$Ganztägig.displayValue]==TRUE,
(toLocaleDateString(#currentField)),
(toLocaleString(#currentField)))
"
}
enter image description here
enter image description here
Per my test, if your Ganztägig column is yes/no column type, you could just replace [$Ganztägig.displayValue] with [$Ganztägig], then you will achieve your goal:
If your Ganztägig column is of type "Yes/No" (Boolean), try using this JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if([$Ganztägig],toLocaleDateString(#currentField),toLocaleString(#currentField))"
}
Note: Make sure you are using correct internal name of Ganztägig column in JSON.
Documentation: SharePoint column formatting
I hope you can help me, I have a sharepoint list, I have a person type column, but I would like to extract the data it has (email, name) and place it as a text type in another column so that when the person type field is changed it also modifies these two but I tried to do it with a calculated column, but I think it is not supported, do you have any idea how to do this type of change.
Thanks
You can achieve it using JSON column formatting code like below:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": {
"operator": "+",
"operands": [
"mail: ",
"[$person.email]",
" name: ",
"[$person.title]"
]
}
}
I have a sharepoint list. One of the fields in it(called DocNumber) is the document number including version. It will look like this ESI-1234-1.0
Basically the rule is, it should start with the text ESI-, then a number, followed by another hipen(-), followed by version number, then a dot(.), and a subversion number
How do i write the 'Column validation' for this. I'm using Sharepoint Online(365 I guess), so there's a placeholder in field level settings to write this formula. I searched online but the syntax is so difficult that I'm finding it hard to customize the formula -
I need something like this, but i don't want to indicate position because the numbers there could be of any length(its a serial number, currently we are at 1600, so we should support 1 to 5 digits atleast and version could be any number from 1 to 99)
=AND(
IF(ISERROR(FIND("ESI-",DocNumber,1)),FALSE,(FIND("ESI-",DocNumber)=1)),
IF(ISERROR(FIND("-",DocNumber,4)),FALSE,(FIND("-",DocNumber,4)=4)))
Thankyou for your help!
In the formula property of column You may use JSON structure like this:
{
"elmType": "div",
"txtContent": {
"operator": "+",
"operands": [
"ESI-",
"[$ID]",
"-",
"[$_UIVersionString]"
]
}
}
here we make a custom view in a div HTML element with text inside. The Text is static string "ESI-" then we add ID column then we add "-" then we add version number column as string
the result should be something like this
... I hope this will be of any help
How can I search a documents named "Hola-Mundo_Army.jpg" searching by the Army* word (always using the asterisk key at the end please)? The thing is that if I search the documents using Army* the result is zero. I think that the problem is the underscore before Army word.
But if I search Mundo_Army* the result is one found, correctly.
docs?api-version=2016-09-01&search=Mundo_Army* <--- 1 result OK
docs?api-version=2016-09-01&search=Army* <--- 0 results and it should find 1 result like the previous search. I always need to use the asterisk at the end.
Thank you!
This is the blob information that I have to search and find:
{
"#search.score": 1,
"content": "{\"azure_cdn\":\"http:\\/\\/dev-dr-documents.azureedge.net\\/localhost-hugo-docs-not-indexed\\/Hola-Mundo_Army.jpg\"}\n",
"source": "dr",
"title": "Hola-Mundo_Army.jpg",
"file_name": "Hola-Mundo_Army.jpg",
"file_type": "Image",
"year_created": "2017",
"client": "LALALA",
"brand": "LELELE",
"description": "HUGO_DEV-TUCUMAN",
"categories": "Clothing and Accessories",
"media": "Online media",
"tags": null,
"channel": "Case Study",
"azuresearch_skipcontent": "1",
"id": "1683",
"metadata_storage_content_type": "application/octet-stream",
"metadata_storage_size": 109,
"metadata_storage_last_modified": "2017-04-26T18:30:35Z",
"metadata_storage_content_md5": "o2yZWelvS/EAukoOhCuuKg==",
"metadata_storage_name": "Hola-Mundo_Army.json",
"metadata_content_encoding": "ISO-8859-1",
"metadata_content_type": "text/plain; charset=ISO-8859-1",
"metadata_language": "en"
}
The best way to troubleshoot cases like this is by using the Analyze API. It will help you understand how your documents and query terms are processed by the search engine. In your case, assuming you are not setting the analyzer property on the field you are searching against, the text Hola-Mundo_Army.jpg is broken down by the default analyzer into the following two terms: hola, mundo_army.jpg. These are the terms that are in your index. That's why, when you are searching for the prefix mundo_army*, the term mundo_army.jpg is matched. Prefix army* doesn't match anything in your index.
You can learn more about the the default behavior of the search engine and how to customize it from this article: How full text search works in Azure Search
I've got an index of hundreds of book titles in elasticserch, with documents like:
{"_id": 123, "title": "The Diamond Age", ...}
And I've got a block of freeform text entered by a user. The block of text could contain a number of book titles throughout it, with varying capitalization.
I'd like to find all the book titles in the block of text, so I can link to the specific book pages.
Any idea how I can do this? I've been looking around for exact phrase matches in blocks of text, with no luck.
You need to index the field title as not_analyzed or using keyword analyzer.
This will tell elasticsearch to do no operations on the field whenever you send a query and this will make you be able to do an exact match search.
I would suggest that you keep an analyzed version as well as a not_analyzed version in order to be able to do exact searches as well as analyzed searches. Your mappings would go like this, in this case I assume that the type name is movies in your case.
"mappings":{
"movies":{
"properties":{
"title":{
"type": "string",
"fields":{
"row":{
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
}
This will give you two fields title which contains an analyzed title and title.row which contains the exact value indexed with absolutely no processing.
title.row would match if you entered an exact