Is it somehow possible to access the value of a different field?

I am trying to use the value of a different field as label for another one.

I tried it like so:
 RepeatableEntry::make('listing.operating_expenses')
      ->label('Operating Expenses')
      ->schema([
          TextEntry::make('operating_expenses_name')
              ->hiddenLabel(true),

          TextEntry::make('operating_expenses_cost')
              ->label(
                  fn($value) => $value['operating_expenses_name'] ?? 'Operating Expenses'
              )
              ->inlineLabel(true)
              ->money('AED'),
      ])->contained(false),

But that seems not work. Help is much appreciated πŸ™‚
Was this page helpful?