EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB486432: Best practices for mapping Python script variables and grid fields for Python transaction configurations


Yiwen Gu

Quality Engineer, Principal • MicroStrategy


The article details best practices for mapping Python script variables and grid fields for Python transaction configurations.

Symptom

Strategy saves all grid field input control properties at the grid level, If a grid field is mapped to different script variables with different data types, the input control properties cannot be saved into the same grid field properties.
 

Solution

To avoid conflicts and user errors, Strategy recommends that you configure Python transactions using any of the following methods:

  • Map one grid field to one script variable with same data type
  • Map one grid field to different script variables with same data type
  • Use one Python script to configure different actions in one grid
  • Use different Python scripts to configure different actions in one grid. Make sure the variables in different Python scripts are the same data type as the mapped grid fields.

For example: 
Script1 contains V1(Number), V2(Text), V3(Date), V4(Date Time)
Script2 contains V5(Number), V6(Text), V7(Date), V8(Date Time)
Grid1 contains GridField1(ID), GridField2(DESC), GridField3(Date), GridField4(Date Time)
Grid1 can have Python transaction actions configured as follows:

  • Action1: Uses Script1 with mapping V1=GridField1, V2=GridField2, V3=GridField3, V4=GridField4
  • Action2: Uses Script2 with mapping V5=GridField1, V6=GridField2, V7=GridField3, V8=GridField4

Comment

0 comments

Details

Knowledge Article

Published:

March 13, 2024

Last Updated:

March 25, 2024