> For the complete documentation index, see [llms.txt](https://learn.vispeahen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.vispeahen.com/kumanda-tablosu/oturum-degiskeni/1.-oturum-degiskeni-nedir.md).

# 1. Oturum Değişkeni Nedir?

Oturum Değişkeni (Session Variable, kısaca SV), bir kullanıcının oturumu boyunca geçerli olan, o oturuma özel bir değer tutan değişkendir. Değeri genellikle oturum başında (örneğin kumanda tablosu yüklenirken) bir kez hesaplanır ve oturum boyunca sabit kalır. SV'nin değeri çoğunlukla oturum açan kullanıcıya göre şekillenir; böylece tek bir rapor, her kullanıcıya kendi bağlamına ve yetkisine uygun biçimde sunulur.

Parametreden temel farkı şudur: parametre, kullanıcının her rapor açılışında elle seçim yapmasını gerektirir; oturum değişkeni ise değerini arka planda otomatik üretir ve kullanıcıdan hiçbir müdahale beklemez.

### <mark style="color:cyan;">**Ne için kullanılır?**</mark>

Oturum değişkenlerinin yaygın kullanım alanları şunlardır:

* **Yetkilendirme / satır düzeyi güvenlik:** Analizlere ve global filtreye otomatik uygulanan filtrelerle kullanıcı yalnızca yetkili olduğu verileri (ör. kendi ili, şubesi veya bölgesi) görür. Bu kılavuzda çalışılan senaryo budur.
* **Kullanıcı bağlamı:** Oturum açan kullanıcının adı, rolü, departmanı veya bölgesi gibi bilgilerin rapor içinde gösterilmesi veya bu bilgilere göre içerik uyarlanmasıdır.
* **Kişiselleştirme:** Varsayılan dil, para birimi ya da görünüm gibi kullanıcıya göre değişen ön ayarların otomatik gelmesini içerir.
* **Dinamik varsayılanlar:** Rapor açıldığında filtrelere otomatik gelen değerler; ör. tüm dashboard'ların güncel yıl ile açılması veya tarih aralığının güncel ayın son gününe göre gelmesi. Bu örnek kullanım senaryoları 9. bölümde örneklenmiştir.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://learn.vispeahen.com/kumanda-tablosu/oturum-degiskeni/1.-oturum-degiskeni-nedir.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
