https://sapui5.hana.ondemand.com/sdk/#/topic/642dab291a7b47ec9d46c39b3c482aba
data-sap-ui-flexibilityServices='[{"connector": "LocalStorageConnector"}]'
https://sapui5.hana.ondemand.com/sdk/#/topic/642dab291a7b47ec9d46c39b3c482aba
data-sap-ui-flexibilityServices='[{"connector": "LocalStorageConnector"}]'
So far I have not found a better/shorter way to check if a table entry exists than the following:
let exists = await SELECT(1).from(Books,201)
return (exists .length > 0) ? true : false
Found here: https://cap.cloud.sap/docs/node.js/cds-tx#cds-tx-ctx-fn
A labeled statement can be used to exit a nested loop.
function loop () {
dance: for (let i = 0; i < 4; i++) {
for (let j = 0; j < 4; j++) {
if (j === 2) break dance
}
}
}
Long press “Home Assistant” at the top

and the menu will switch to edit mode

The same can be achieved via the profile settings

Simply go to your Component.js file and add this line to the init function:
this.getModel().setHeaders({"myCustomParameter": "test"})
In a CAP Backend, you get this parameter from the express req object, which can be accessed via the req.http property:
req.http.req.headers['myCustomParameter']
And here is a nice code snippet, on how to read this header parameter in an ABAP system: https://answers.sap.com/answers/425621/view.html
Every few months, I run into this issue when adding a torrent to transgui:

Although there is a 5-year-old closed issue on this bug, which also led to a code adjustment, this bug still seems to exist: https://github.com/transmission-remote-gui/transgui/issues/1270
The user Kethsar has probably already found the right cause and gives some hints on how to solve it. At least it helped me to find a workaround:
[AddTorrent.transmission]section
Folder1=/my/path/1
FolHit1=1
FolExt1=
LastDt1=18.02.2024
Folder2=/my/path/2
FolHit2=3
FolExt2=
LastDt2=18.02.2024
...
It seems like the issues occurs, when the [AddTorrent.transmission] section reaches Folder50.
Somehow, I’ve only just realized that a badge icon can be used to display another entity status on a template card, even though it’s written in the documentation. I now use it to display the status of presence or motion sensors in the respective rooms.
badge_icon: >-
{{ "mdi:motion-sensor" if states("binary_sensor.0xb4e3f9fffeb689d4_occupancy") == "on" }}
badge_color: >-
{{ "green" if states("binary_sensor.0xb4e3f9fffeb689d4_occupancy") == "on" }}

Somehow I always forget that there is a boolean function in ABAP. That’s why I’m writing this post to hopefully remember it better. 🙂
If you just want to check something for truthiness, you can do it in the following three ways:
IF sy-subrc = 0.
result = abap_true.
ELSE.
result = abap_false.
ENDIF.
result = SWITCH #( sy-subrc WHEN 0 THEN abap_true
ELSE abap_false ).
result = xsdbool( sy-subrc = 0 )