Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
PRB6803
Contributor II
Contributor II

App.SetScript clearing my load script

I have a visual studio App that extracts, information about a Qlik Sense "App".

One of the options extracts the load script into a multiline textbox where you can then edit. Once happy I have a button that calls App.Setscript(textbox.text) when this executes it either clears everything out of my apps load script or in some cases simply retains the Main Tab. I have tried variables that are defined by calling the app.getscript or specifically as string and in all instances the same thing happens. If I simply set the string to Testing then the word testing appears.

Are their control characters that are impacting, do I need to decalre the variable as something other than string or object based on a call (which if I am not mistaken would also set the object to string)

Thanks in advance for any ideas

Labels (1)
2 Solutions

Accepted Solutions
PRB6803
Contributor II
Contributor II
Author

Further to the above the more I test the more it looks like it is something to do with getting the text from the textbox control itself. I have copied it into a string variable also with no joy. If I do a replace on certain words in what comes from getscript without interference of a textbox then the setscript works as it does when in the text variable I hard code text

 

View solution in original post

PRB6803
Contributor II
Contributor II
Author

I deleted my routine and wrote from scratch and it seems to be working now, I tried all sorts, Unicode, clean up of none standard ascii characters.
Not sure where or what was different however the SetScript appears to be fine

View solution in original post

2 Replies
PRB6803
Contributor II
Contributor II
Author

Further to the above the more I test the more it looks like it is something to do with getting the text from the textbox control itself. I have copied it into a string variable also with no joy. If I do a replace on certain words in what comes from getscript without interference of a textbox then the setscript works as it does when in the text variable I hard code text

 

PRB6803
Contributor II
Contributor II
Author

I deleted my routine and wrote from scratch and it seems to be working now, I tried all sorts, Unicode, clean up of none standard ascii characters.
Not sure where or what was different however the SetScript appears to be fine