# Function toExecutePivotQueryParams

toExecutePivotQueryParams(widgetModel): ExecutePivotQueryParams

Translates a WidgetModel to the parameters for executing a query for the pivot widget.

# Parameters

Parameter Type
widgetModel WidgetModel

# Returns

ExecutePivotQueryParams

# Example

<script setup lang="ts">
import { widgetModelTranslator, useGetWidgetModel, useExecuteQuery } from '@sisense/sdk-ui-vue';
import { computed } from 'vue';

const { data: widgetModel } = useGetWidgetModel({
 dashboardOid: 'your-dashboard-oid',
 widgetOid: 'your-widget-oid',
});

const executePivotQueryParams = computed(() =>
 widgetModel.value ? widgetModelTranslator.toExecutePivotQueryParams(widgetModel.value): { enabled: false },
);

const { data, isLoading, isError } = useExecutePivotQuery(executePivotQueryParams);
</script>

Note: this method is supported only for getting pivot query. Use toExecuteQueryParams instead for getting query parameters for non-pivot widgets.