Hello, I am just testing this function like this
createfile until __endoffile
…few hundred lines…
But then I see that it failed! 156 lines have “completed” and then 157th says failed!
Is this function limited to only write some amount of data or what is this?
I have createfile commands running beyond 156 lines. My largest right now is 865 lines and it works like a champ. You should take a look at the client logs on the machine you are running the action against to get more details of what failed. Feel free to post what you find here.
If there is an error anywhere inside the createfile (like a relevance statement in error), the error message always shows up on the last line in the console log.
You might get more detail from the client log instead.
If the content contains { }, that is taken to be a Relevance Substitution. If there is an error in the relevance (or it’s not Relevance at all) it yields a relevance Substitution error.
If it’s not Relevance, you d to escape the brackets by changing ,{ to {{
It’s a good point. We should update the ‘createfile’ documentation to include a note warning about the potential need to escape curly braces, and provide an example as well.
Thanks for mentioning this. I ran into the exact same issue.
Can I just escape all left and right curly braces to be safe? I have a Powershell script where I’m using createfile and there are a ton of both left and right curly brackets, sometimes embedded multiple levels. I tried escaping all left curly brackets but that didn’t solve the issue.
I wish there was a way to escape an entire line so I don’t have to worry about it at all?
I realized my own issue: I didn’t sync components in my baseline. When I escaped all of the left curly brackets in my task, the baseline doesn’t use the new version so that’s why my second attempt failed. I’m still a Bigfix newbie.