# Configure action script

**URL:** <https://forum.inductiveautomation.com/t/configure-action-script/33083>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [March 13, 2020, 9:05pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083 "2020-03-13T21:05:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [March 13, 2020, 9:05pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083/1 "2020-03-13T21:05:47Z")

</div>

Hi all  
Can you help me please because I don’t see what is wrong?  
Please look

 ![PNG](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/efe6f8e81c4e4721b7ec91eb6b1ae2a3ddeea6bc.jpeg) at the picture.  
Thank You

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 13, 2020, 9:12pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083/2 "2020-03-13T21:12:01Z")

</div>

Your parms object looks like you’re trying to start it with a paren ( `(` ) instead of a curly bracket ( `{` ). So the code is failing to register the object as being completed.

Also, your entire `parm` object should be indented to the left.

Also also, you should provide code here within coupled triple backticks " ` "

```auto
parms = ( 'one': 'something',
    'two': 'else'}
    system.db.runNamedQuery(blahblahblah)

```

should be

```auto
    parms = {
        'one': 'something',
        'two': 'else'
    }
    system.db.runNamedQuery(blahblahblah)

```

---

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [March 13, 2020, 9:18pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083/3 "2020-03-13T21:18:08Z")

</div>

So my code is here and i still don’t see mistake ☹

```auto
 parms = {"3rt" : self.getSibling("RT").props.value,
	 "barcode" : self.getSibling("barcode").props.text ,
	 "name" : self.getSibling("name").props.text,
     "number_Squeeze" : self.getSibling("number").props.value,
     "forMachine": self.getSibling("toMachine").props.text,
     "avargeFrom" : self.getSibling("avergeFrom").props.value,
     "avargeTo" : self.getSibling("avergeTo").props.value ,
     "coldCanal" : self.getSibling("coldCan").props.value,
     "location" : self.getSibling("location").props.text,
     "adapterID": self.getSibling("adapterID").props.value,
     "machine_ID":self.getSibling("IDstroj").props.value }
  
   # Run the Named Query
      system.db.runNamedQuery("Technic","adapter",parms)

```

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 13, 2020, 9:24pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083/4 "2020-03-13T21:24:41Z")

</div>

Because your indentation is still not correct:

Correct indentation:

 ![15%20PM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/1037144791783178ece99f59cf524471398dc735.png)

Wrong indentation:

 ![23%20PM](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/3cca9d184d6506d911bd179e5ec70273e94711a5.png)

```auto
    params = {
	    "3rt": self.getSibling("RT").props.value,
	    "barcode": self.getSibling("barcode").props.text,
	    "name": self.getSibling("name").props.text,
	    "number_Squeeze": self.getSibling("number").props.value,
	    "forMachine": self.getSibling("toMachine").props.text,
	    "avargeFrom": self.getSibling("avergeFrom").props.value,
	    "avargeTo": self.getSibling("avergeTo").props.value,
	    "coldCanal": self.getSibling("coldCan").props.value,
	    "location": self.getSibling("location").props.text,
	    "adapterID": self.getSibling("adapterID").props.value,
	    "machine_ID": self.getSibling("IDstroj").props.value
	}
	system.db.runNamedQuery("Technic","adapter",parms)

```

---

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [March 13, 2020, 9:38pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083/5 "2020-03-13T21:38:38Z")

</div>

Ah ok, now I understand Thank you 😃 Sorry for my question because I am a student in Ignition. So I have now a second problem with an error when I click on the button I get back error message. I have Queries when I insert rows to a table. and event on the button when I have a script for running these queries. What I do bad?

 ![all](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5f1e969463dc4e3a22b488ba9a3bfc29a5f40bad.png) ![querie](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f27177fe9e8ecfbd7657f952f7dbf448244f2b40.png) ![reeoe](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e0cd842d0ca53a3d4e97766d61f42968add9f428.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 13, 2020, 9:45pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083/6 "2020-03-13T21:45:26Z")

</div>

Your indentation for the `parms` object is still wrong. Look very closely at the screenshots I provided. If you look at your screenshot from the latest post which shows your script, you can see in the upper right a small red rectangle; this means the code will not compile. If you hover over it, you’ll probably see something like see `mismatched input '' expecting DEDENT`. It’s telling you that the `parms` variable declaration is indented too far.

Indentation is extremely important while using Python.

---

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [March 13, 2020, 9:57pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083/7 "2020-03-13T21:57:38Z")

</div>

Sorry i send you wrong screen. Now i have compilation code ok but i still have wrong script.

 ![all](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8cd9e473a80d775a85a703e521310934538bb13a.png) ![querie](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/3fa6fefcf6001a8e562d64a5b0d2aa1957597dd4.png) ![reeoe](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8ac76199b481758dc44fdb15739a09f33b1b7d3d.png)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 13, 2020, 10:02pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083/8 "2020-03-13T22:02:01Z")

</div>

You can’t do that.

`rt` as you are using it now is a variable, not a reference to a component.

`self.getSibling("RT").props.value` in no way equates to `rt.props.value`

---

<div class="post-metadata">

**Author:** ![etlikmilos](https://avatars.discourse-cdn.com/v4/letter/e/fbc32d/32.png) [@etlikmilos](https://forum.inductiveautomation.com/u/etlikmilos)\
**Post date:** [March 13, 2020, 10:09pm UTC](https://forum.inductiveautomation.com/t/configure-action-script/33083/9 "2020-03-13T22:09:05Z")

</div>

Thank you now is all ready.  
😃
