# Function Sharing Across Projects

The Function Sharing Across Projects feature in SimplifyQA allows users to utilize and manage functions across multiple projects to promote reusability and streamline workflows.&#x20;

### Adding Functions from Different Projects

* Project Selection Dropdown
  * When adding a function step, users can select a Project from a dropdown next to the step sequence number.
  * The dropdown displays only the projects that the user has access to.

<figure><img src="/files/lvu90mkNk7hbV7cvzkbj" alt="" width="482"><figcaption></figcaption></figure>

* Default Project Selection
  * By default, the project selected is auto-populated in the function step.
  * Example: If “Sandbox” is selected in the header, “Sandbox” is pre-selected in the function step.

<figure><img src="/files/O4FKx04AU0OQCwTKkYqx" alt="" width="487"><figcaption></figcaption></figure>

* Function and Version Selection
  * Based on the selected project, the list of functions available to the user in that project is displayed.
  * By default, the first version of the function is selected.
  * If the function has multiple versions, users can change the version in the Version field of the step.

### Editing Shared Functions

* Functions added from other projects are read-only:
  * Users cannot edit the steps, objects, parameters, or step descriptions of shared functions.
  * The steps are disabled with a non-editable cursor on hover.
* Test Data Editing
  * Users can still edit the test data for shared functions in the test case.

### Test Data Management

* When a function from Project B is used in a test case in Project A:
  * The test data environment and iterations are sourced from Project B.
  * Data environment selection is independent for each entity and loosely coupled.
  * Any edits to the function’s test data are reflected globally across all uses of that function.
* Runtime Parameters
  * When a shared function with runtime parameters is used:
    * If the destination project has the runtime key, it’s used.
    * If not, the system automatically creates the runtime key in the destination project.
* Copying Test Cases Across Projects
  * When copying a test case that contains a shared function to another project:
    * The shared function is copied in a disabled format.
* Test Intelligence Settings
  * When a function is shared across projects, the Test Intelligence settings from the source project are applied.
* Access Restrictions
  * If a user does not have access to the project containing a shared function:
    * The test case displays an empty state with a message:

      > “This test case has functions from projects to which you do not have access.”
    * The empty state lists the project IDs and names of the shared functions (as per Figma design).
  * This also applies to report screens where the same empty state is displayed.
* Execution Plans and Workflows
  * When a test case with shared functions is added to a suite, execution plan, workflow, scheduler, or pipeline:
    * The same empty state is displayed listing the projects of the shared functions.

### Deleting Shared Functions

* When a function is used in multiple projects, deleting it triggers a dependency pop-up.
  * The pop-up lists the usage counts in Functions and Test Cases (hyperlinked).
  * The counts are grouped by project.
* Clicking a hyperlink redirects the user to the respective project with a filtered view of the functions or test cases where the function is used.
* When multiple functions are selected for deletion, the pop-up displays a combined table showing usage counts across all selected functions and projects.

{% hint style="success" %}
**Key Considerations**

* Users can change the project selection for a function but cannot edit its steps.
* Functions from other projects are view-only to preserve the integrity of shared assets.
* Test data remains editable, allowing flexibility in different test environments.
* Function sharing ensures reusability while maintaining security and data governance across projects.
  {% endhint %}

### Conclusion

The Function Sharing Across Projects feature enhances collaboration, reusability, and transparency while ensuring strict access controls and proper data management. It empowers users to leverage shared functions efficiently across their projects within SimplifyQA.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.simplifyqa.ai/introduction-to-test-management-in-simplifyqa/function-sharing-across-projects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
