# Kontrol ifadeleri

grafik verilerini değiştirirken, bir dizi ifadeden oluşan Qlik Sense komut dosyasının bir alt kümesini kullanırsınız. Bir ifade, normal bir komut dosyası ifadesi veya bir komut dosyası kontrol ifadesi olabilir.

Kontrol ifadeleri tipik olarak komut dosyası yürütme akışını kontrol etmek için kullanılır. Bir kontrol ifadesinin her bir yantümcesi tek bir komut dosyası satırı içinde tutulmalıdır ve noktalı virgül veya satır sonu ile sonlandırılabilir.

Önekler hiçbir zaman kontrol ifadelerine uygulanmaz.

Tüm komut dosyası anahtar sözcükleri, küçük ve büyük harflerin herhangi bir kombinasyonuyla yazılabilir.

Her bir fonksiyonun kısa açıklamasını ve söz dizimini görmek için her bir fonksiyonun açılan menüsünü kullanın. Daha ayrıntılı bilgiler için söz dizimi açıklamasında fonksiyon adına tıklayın.

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### Call

call kontrol ifadesi, önceki bir sub deyimiyle tanımlanmış olması gereken bir alt rutini çağırır.

[**Call**](https://help.qlik.com/tr-TR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/Call.htm) name ( [ paramlist ])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### Do..loop

do..loop kontrol ifadesi, mantıksal koşul sağlanıncaya kadar bir veya daha fazla deyimi yürüten bir kod yineleme yapısıdır.

[**do**](https://help.qlik.com/tr-TR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/do.htm) [ ( while | until ) condition ] [statements]  
[exit do [ ( when | unless ) condition ] [statements]  
loop [ ( while | until ) condition ]

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### End

End komut dosyası anahtar sözcüğü, If, Sub ve Switch yantümcelerini kapatmak için kullanılır.

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### Exit

Exit komut dosyası anahtar sözcüğü, Exit Script ifadesinin bir parçasıdır, ancak Do, For veya Sub yantümcelerinden çıkmak için de kullanılabilir.

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### Exit error

Exit error deyimi, komut dosyası yürütmesini sonlandırır ve kullanıcı tanımlı bir komut dosyası hatası verir.

[**exit error**](https://help.qlik.com/tr-TR/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlStatements/exit%20error.htm) expression[ (when | unless) condition ]

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### Exit script

Kontrol ifadesi kod yürütmeyi durdurur. Kodda herhangi bir yere eklenebilir.

[**exit-script**](https://help.qlik.com/tr-TR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/exit-script.htm)[ (when | unless) condition ]

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### For..next

for..next kontrol ifadesi, sayaçlı bir kod yineleme yapısıdır. for ve next öğelerinin içine aldığı döngünün içindeki deyimler, belirtilen düşük ve yüksek sınırlar arasındaki sayaç değişkeninin her bir değeri için yürütülür.

[**For**](https://help.qlik.com/tr-TR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/For.htm) counter = expr1 to expr2 [ stepexpr3 ]

[statements]

[exit for [ ( when | unless ) condition ]

[statements]

Next [counter]

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### For each ..next

for each..next kontrol ifadesi, virgülle ayrılmış listedeki her bir değer için bir veya daha fazla deyimi yürüten bir kod yineleme yapısıdır. for ve next öğeleri arasına alınan döngüdeki deyimler, listedeki her bir değer için yürütülür.

[**for-each**](https://help.qlik.com/tr-TR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/for-each.htm) var in list

[statements]

[exit for [ ( when | unless ) condition ]

[statements]

next [var]

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### If..then

if..then kontrol ifadesi, bir veya daha fazla mantıksal koşula bağlı olarak farklı yolları takip etmesi için kod yürütmesini zorlayan komut seçim yapısıdır.

Bilgi notuif..then ifadesi bir kontrol ifadesi olduğundan ve bu nedenle noktalı virgül veya satır sonu ile sonlandırıldığından, olası dört yantümcesinin her biri (if..then, elseif..then, else ve end if) bir satır sınırını geçmemelidir.

[**If**](https://help.qlik.com/tr-TR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/If.htm) condition then

[ statements ]

{ elseif condition then

[ statements ] }

[ else

[ statements ] ]

end if

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### Next

Next komut dosyası anahtar sözcüğü, For döngülerini kapatmak için kullanılır.

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### Sub

sub..end sub kontrol ifadesi, bir call deyimiyle çağrılabilecek bir alt yordam tanımlar.

[**Sub**](https://help.qlik.com/tr-TR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/Sub.htm) name [ ( paramlist )] statements end sub

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### Switch

switch kontrol ifadesi, ifade değerine bağlı olarak, yolları takip etmek için kod yürütmesini zorlayan bir kod seçim yapısıdır.

[**Switch**](https://help.qlik.com/tr-TR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/Switch.htm) expression {case valuelist [ statements ]} [default statements] end switch

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)

#### To

To komut dosyası anahtar sözcüğü çeşitli komut dosyası ifadelerinde kullanılır.