Handling executeChoice Return Values Across Multiple Macros in QuickAdd #679
Unanswered
lucasbcgeo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I am developing a multi-script system in Obsidian using the QuickAdd plugin to automate the creation and management of notes based on user-selected themes. The system involves three main scripts that determine the name/path, frontmatter, and content/backmatter of notes.
Issue:
While the scripts are executing and the data is being correctly generated and logged, the expected results are not being returned to the main script. As shown in the console output, the auxiliary script successfully generates the required data, but it fails to return these data back to the main script, leading to undefined results.
Example of Issue:
The auxiliary script nameAndPath.js is supposed to return an object with properties like path, name, and success.
The main script calls this auxiliary script using quickAddApi.executeChoice() and expects to receive the object.
Despite the auxiliary script logging the correct return object, the main script receives undefined.
Request:
I would appreciate any insights or suggestions on why the results are not being returned as expected and how to ensure that the auxiliary script's output is correctly captured by the main script. Any advice or examples of handling similar situations in Obsidian or with the QuickAdd plugin would be extremely helpful!
Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions