sharepoint online – anyone else got this problem while using JSON view format? List items not showing after the 30th row?

I tried it several times with chrome whenever am at the 30th the row in the list it stops showing the rest of the rows.

When I inspect element browser it loads the rest of the rows or when I move the mouse several times up and down in the scroll bar.

tdd – using json for unit-tests input and outputs instead of builders and assertions?

Background: I’m writing unit-tests for a java data-intensive application. The application’s input are user defined database tables that can contain all data types (numeric-types, string-types, date-types..), and is represented by large hierarchical value classes. There are many classes that perform various transformations and I want to test them.

The current approach builds a big instance with a autovalue Builder, runs the tested class, and then does large asserts on each of the output fields. This is done several times to faithfully represent the various data types that the user can use (numeric-types, string-types, date-types..)

I want to convince a colleague to switch to having the input and output represented in json files! I’m arguing that the current approach cons are:

  • manually creating large build and large assert code is error-prone
  • it is tightly coupled with the current implementation (i.e. autovalue)
  • its so much easier to auto-generate a json and just review it!

the colleague is arguing that:

  • not all internal classes have json serde, and some might contain external classes which would be difficult to add serde
  • build and assert code is guarded by the compiler
  • that’s the java-way 🙂

can you help me with arguments to convince and win this debate? or even better links to reliable sources that champion the json serde for everything approach?

How to delete all but certain values from many JSON files?

i’ve used another Terminal utility to download all my videos from Youtube (youtube-dl if interested). with these, are created a JSON file for each video file. inside these JSON files is a LOT of junk. but there are 3 items/values/categories(?) that i want to keep, the rest can be deleted.

those things are
{“upload_date”: “value”,
“fulltitle”: “value”,
“description”: “value”}

so i either need to:

  1. delete all but these 3 items & save the file, or
  2. extract these 3 items to a new file & delete the old one.

hoping for (but haven’t been able to find) a Mac app that can batch do this for all the files at once.
or
have a Terminal script (that’s EASY, as i don’t know about all that),
or
an Automator script (again, that’s EASY) that’ll do it all.

How to batch delete all but certain items in a lot of JSON files?

i’ve used another Terminal utility to download all my videos from Youtube (youtube-dl if interested). with these, are created a JSON file for each video file. inside these JSON files is a LOT of junk. but there are 3 items/values/categories(?) that i want to keep, the rest can be deleted.

those things are
{“upload_date”: “value”,
“fulltitle”: “value”,
“description”: “value”}

so i either need to:

  1. delete all but these 3 items & save the file, or
  2. extract these 3 items to a new file & delete the old one.

hoping for (but haven’t been able to find) a Mac app that can batch do this for all the files at once.
or
have a Terminal script (that’s EASY, as i don’t know about all that),
or
an Automator script (again, that’s EASY) that’ll do it all.

Adding custom hover text using json to a SharePoint list column

You can try this and customize to suit your need

{
  "elmType": "div",
  "style": {
    "font-size": "12px"
  },
  "txtContent": "@currentField",
  "customCardProps": {
    "formatter": {
      "elmType": "div",
      "txtContent": "[$Description]",
      "style": {
        "font-size": "12px",
        "color": "green",
        "padding": "5px"
      }
    },
    "openOnEvent": "hover",
    "directionalHint": "bottomCenter",
    "isBeakVisible": true,
    "beakStyle": {
      "backgroundColor": "white"
    }
  }
}

enter image description here

json – Como direcionar objeto a uma variável em PHP

Gente, to fazendo um quiz que pode direcionar a páginas com diferentes resultados.
Para atribuir um valor a cada escolha montei um json com strings q cada uma tem um número respectivo, assim:
"answer":7
transformei esse json em um objeto com o json_decode(). e para pegar cada uma das opções selecionadas e somar todas fiz esse esquema aí em baixo:

<?php
$json_score = '{
    "example1":2,
    "example2":5,
    "example3":-3
}';
$food = $_POST('food');
$drink = $_POST('drink');
$score_list = json_decode($json_score);

$score = 0;
for($i = 0; $i < count($food); $i++)  {
    $score = $score + $score_list->food($i);
};
?>```

Porém tive probelmas, o problema não está no POST, pois já usei ele pra outras funcionalidades, ei acho que o problema está em por a variável ali dentro do for, mas como eu faria para somar os valores de cada elemento dentro do array food??

O erro mostrado pelo navegador foi o seguinte:

Notice: Undefined property: stdClass::$food in C:xampphtdocsProjeto Lohresult.php on line 48

Notice: Trying to access array offset on value of type null in C:xampphtdocsProjeto Lohresult.php on line 48

Notice: Undefined property: stdClass::$food in C:xampphtdocsProjeto Lohresult.php on line 48

Notice: Trying to access array offset on value of type null in C:xampphtdocsProjeto Lohresult.php on line 48

Notice: Undefined property: stdClass::$food in C:xampphtdocsProjeto Lohresult.php on line 48

Notice: Trying to access array offset on value of type null in C:xampphtdocsProjeto Lohresult.php on line 48

sharepoint online – is it mandatory to include “originator” to json while sending an adaptive card to outlook via Power Automate

I am working on an adaptive card which has Action.OpenUrl actions in it and I am trying to send the same via Power Automate to Outlook.

The problem is when I send it to myself, the adaptive card is displayed in the email body but when I trigger the same email to my team members, the adaptive card is missing in the email body.

Has anyone faced any similar issue with adaptive cards? has anyone worked on sending adaptive cards to outlook? if yes, is it mandatory to register at https://outlook.office.com/connectors/oam/publish for actionable messages to be sent to Outlook and to add the ‘originator’ to the JSON.

sharepoint online – JSON view formatting [$Editor] en [$Modified] not visible

Try this JSON for test (it is working for me):

{
    "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
    "hideSelection": true,
    "hideColumnHeader": true,
    "rowFormatter": {
        "elmType": "div",
        "attributes": {
            "class": "sp-row-card"
        },
        "children": (
            {
                "elmType": "div",
                "attributes": {
                    "class": "sp-row-title"
                },
                "txtContent": "($Modified)"
            },
            {
                "elmType": "div",
                "attributes": {
                    "class": "sp-row-title"
                },
                "txtContent": "($Editor.email)"
            }
        )
    }
    
}

Note:

In order to access the Modified By and Modified columns in JSON, it should be included in the list view.

You can include the column in list view from view settings like:

enter image description here

official documentations:

  1. Use view formatting to customize SharePoint
  2. Use column formatting to customize SharePoint – You can find supported functions and guidelines for JSON formatting in this link

The people field object has the following properties (with example values):

{
   "id": "122",
   "title": "Kalya Tucker",
   "email": "kaylat@contoso.com",
   "sip": "kaylat@contoso.com",
   "picture": "https://contoso.sharepoint.com/kaylat_contoso_com_MThumb.jpg?t=63576928822",
   "department":"Human Resources",
   "jobTitle":"HR Manager"
}

Also, to convert the date columns in other formats, you can use toLocaleDateString() or toLocaleString() functions.