# Ability to 'don't export' events

**URL:** <http://forum.squareline.io/t/ability-to-dont-export-events/5602>\
**Category:** Feature requests\
**Created:** [February 25, 2025, 8:51pm UTC](http://forum.squareline.io/t/ability-to-dont-export-events/5602 "2025-02-25T20:51:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard](http://forum.squareline.io/user_avatar/forum.squareline.io/richard/32/1129_2.png) [@Richard](http://forum.squareline.io/u/Richard)\
**Post date:** [February 25, 2025, 8:51pm UTC](http://forum.squareline.io/t/ability-to-dont-export-events/5602/1 "2025-02-25T20:51:40Z")

</div>

### What do you want to achieve?

I’d like the ability for my UI engineer to setup events in SquareLine that are not exported into the product code.

### Mention some use cases

This way, my UI engineer can freely design how the transitions should look, but I can also use function calls to control navigation.

Here’s an example password entry page:

 ![image](http://forum.squareline.io/uploads/default/original/2X/2/2bcea54eb88b949919170950ac063a640cb15d45.png)

- In SquareLine simulator, clicking ![image](http://forum.squareline.io/uploads/default/original/2X/c/cf84993a3db63a6956b5f3dc520d55b7e26e4af2.png) button moves to the next page in flow. Not exported.
- When exported, a function call C code checks type of chosen access point, finds password length requirement, compares keyboard text field length with access point requirement, if password is ok move to the next page in flow, otherwise show a helpful error.

### Do you see alternative options and workaround to achieve it?

Currently our workflow is:

1. UI engineer designs nice flow
2. Firmware engineer(me) replaces screen changes with function calls and error checking
3. Screen changes no longer work in SquareLine

---

<div class="post-metadata">

**Author:** ![SquareLine\_Support](http://forum.squareline.io/user_avatar/forum.squareline.io/squareline_support/32/47_2.png) [@SquareLine\_Support](http://forum.squareline.io/u/SquareLine_Support)\
**Post date:** [February 28, 2025, 7:56am UTC](http://forum.squareline.io/t/ability-to-dont-export-events/5602/2 "2025-02-28T07:56:23Z")

</div>

Hi, thanks for the idea, it’s an interesting concept to make event exporting optional.

While we don’t currently have a “don’t export” option for events, I’d like to suggest a workaround that might help with your workflow.

Try adding a call function action before the screen change event. In this function, you can determine when the screen change function should actually run:

Add a custom function call that runs before your screen transition  
Implement your password validation logic in this function  
Have this function return a value that determines whether the screen change should proceed

I’m not exactly sure how you’re using the call function and what your project structure looks like, but this might be a solution for you.

---

<div class="post-metadata">

**Author:** ![Richard](http://forum.squareline.io/user_avatar/forum.squareline.io/richard/32/1129_2.png) [@Richard](http://forum.squareline.io/u/Richard)\
**Post date:** [February 28, 2025, 2:53pm UTC](http://forum.squareline.io/t/ability-to-dont-export-events/5602/3 "2025-02-28T14:53:38Z")

</div>

> Try adding a call function action before the screen change event. In this function, you can determine when the screen change function should actually run:  
> Add a custom function call that runs before your screen transition  
> Implement your password validation logic in this function  
> Have this function return a value that determines whether the screen change should proceed

I’m not sure I understand how this would work. Currently the custom function-call event handlers have a void return type. I think SquareLine would need to emit some logic to call the custom function, then check what it returned before the screen change.

I did have another idea - does SquareLine studio use the \_events.py file? If so, perhaps I could put an unconditional screen change in the Python event handler, and keep a conditional screen change in the C event handler?

---

<div class="post-metadata">

**Author:** ![Richard](http://forum.squareline.io/user_avatar/forum.squareline.io/richard/32/1129_2.png) [@Richard](http://forum.squareline.io/u/Richard)\
**Post date:** [April 11, 2025, 3:46pm UTC](http://forum.squareline.io/t/ability-to-dont-export-events/5602/4 "2025-04-11T15:46:29Z")

</div>

I exported my project to Micropython, and found this line triggers a screen change:

`ChangeScreen(ui_${SquareLineScreenName}, lv.SCR_LOAD_ANIM.MOVE_RIGHT, 200, 0)`

Now I can put it into my project\_events.py to rig the UI transitions while my C project handles the more complicated interactions.
