I need more information. Can you tell me exactly what you're trying to accomplish?
And I can't run your example, because 1) I don't know the values for the variables you're using, and 2) You didn't supply all the required parameters, like "customButtonText" and other values.
Damn, I knew I forgot something... thanks for reminding me on that, Dan.
My Macro is based on your Execute Macro by Name Version 1.2 with the Option embnShowEditButton enabled.
The other Parameters are
customButtonText: Edit (default of the Template-Macro)
%Variable%ssp__PickList Size%: 25
%Variable%ssp__Width%: in my case 1100 due to some very long Topicnames
%Variable%sspStatusLineFunction%: codeblock below
function(fieldValues) {
if (!fieldValues)
return "";
var result = "KM-Discourse: " + fieldValues.KMF_Category;
if (fieldValues.Author) {
result = result + ", " + fieldValues.Author;
}
return result;
}
My Goal is to edit the supplied Sub-Macros or open and edit the JSON File when no Selection is made and otherwise to edit the corresponding JSON array if I made a selection.
Since this is the first time I need to accomplish something like that, I hope there are all Infos you need to have now.
let me know if there is still something missing for you.
I'll try my very best. to give you all the Infos you need.
That's what the "IF" action is supposed to be doing.
Try adding some Prompts and display the various fields that are being used, to make sure they contain what you think they do. For example, before the "IF" action, display what's in the text part of the IF, and also what's in the "is" portion.
The Variable sspData returns as "empty" this means Local__JSON - which should be the same - is empty, too.
I think the problem here is clear. Your Spotlight Search Prompt Macro seems to delete sspData. - That is not bad at all ... Only i n my Usage case since I need sspData after the Spotlight Search Prompt has done its Magic.
My Idea to fix this could be:
providing a Variable Local__sspData with the Value %Variable%sspData%
set Local__JSON to Value %Variable%Local__sspData%
I'm afraid I'm going to have to leave you to figure this out by yourself. I'm sorry, but I can see where this is leading, and it's taking more of my time than I can spare on this. Good luck!
It took time like forever for my somewhat "sometimes I am an Idiot" Head I have on my neck these days to figure out what the heck I was doing using your example code.
As I sometimes do the same like you are doing when developing Macros - using the Prompt for User Input Action to show results - I did NOT place it outside the For Each Action what caused the code to only parse me the very First URL.
Just edited the Macro moving the Action out there - It is working like it is supposed to !!
I'm now getting every array parsed out of my currently more than 130.