-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blank if null with result.asString ? #129
Comments
Thank you for your kind words! And for using it As a workaround, you can currently do this: const modalForm = app.plugins.plugins.modalforms.api;
const result = await modalForm.openForm('climateLogForm');
const data = result.getData()
if (data.AC_probe_T_avg){
tR += `AC_probe_T_avg :: ${AC_probe_T_avg}\n`;
} How would it look like something like this (this is the idea I have in mind) const modalForm = app.plugins.plugins.modalforms.api;
const result = await modalForm.openForm('climateLogForm');
tR += result.map('AC_probe_T_avg', (value) => `AC_probe_T_avg :: ${value}`) Here, if the value of AC_probe_T_avg is undefined, then the map will return an empty string, but if the value exists, then it will use your function to transform it to whatever you want |
Hello !
What a wonderful plugin ! Thanks for working hard on it.
Do you know if there is a way to output nothing if we submit no value into the prompt ? Here is an exemple :
With this snippet, if I enter 25 it renders like : AC_probe_T_avg :: 25
But if I let the prompt empty and submit it, it renders AC_probe_T_avg :: {{AC_probe_T_avg}}
I would like to render it just like AC_probe_T_avg ::
Is there any way to do it ?
Thank you so much !
The text was updated successfully, but these errors were encountered: