nocin.eu

Homelab, Linux, JS & ABAP (~˘▾˘)~
 

[Home Assistant] Dashboard – vertical-stack title

Just learned that you can directly provide a title for a vertical-stack. Until now, I always added a mushroom-title-card at the beginning of every new stack like that:

type: vertical-stack
cards:
  - type: custom:mushroom-title-card
    title: Lichter

But as you can directly provide a title for the vertical stack, you can get rid of this now unnecessary title card. The title can only be set via code editor.
The only difference is the smaller gap between title and content, which in my opinion looks even better this way.

type: vertical-stack
title: Lichter

[Excel] TEXTVOR

TEXTVOR eignet sich zum Splitten einer Spalte, wenn z.B. nur der Teil vor einem Separator gebraucht wird bzw. bei mehreren gleichen Separatoren, lediglich das erste Ergebnis benötigt wird.

=TEXTVOR("1000|2000|TEST|APFEL";"|")

Ergebnis: 1000

[ABAP] SALV – Access column name

  TRY.
      cl_salv_table=>factory( IMPORTING r_salv_table = DATA(lo_alv)
                              CHANGING  t_table      = lt_output ).
    CATCH cx_salv_msg INTO DATA(lx_salv).
      WRITE: / lx_salv->get_text( ).
  ENDTRY.

  DATA(columns) = lo_alv->get_columns( ).
  DATA(lt_cols) = columns->get( ).

  LOOP AT lt_cols INTO DATA(ls_cols).
    DATA(lo_column) = ls_cols-r_column.
    CASE ls_cols-columnname.
      WHEN 'MANDT'
        lo_column->set_visible( abap_false ).
    ENDCASE.
  ENDLOOP.

[SuccessFactors] OData V2 – filter in (VSC Rest-API Client)

When filtering an OData V2 endpoint, you can simply list your values separated by a comma after the keyword in (option 2). Much shorter than having to repeat your filter statement all the time, like in option 1.

@user1=10010
@user2=10020

### Option 1: Filter userId using OR condition
GET {{$dotenv api_url}}/odata/v2/User?$filter=userId eq '{{user1}}' or userId eq '{{user2}}'
Authorization: Basic {{$dotenv api_auth}}
Accept: application/json

### Option 2: Filter userId using IN condition
GET {{$dotenv api_url}}/odata/v2/User?$filter=userId in '{{user1}}', '{{user2}}'
Authorization: Basic {{$dotenv api_auth}}
Accept: application/json