Is there any available reference where we can check what are available string manipulation methods?
I am looking for equivalents for ‘substring’,‘index’,‘length’,‘contains’.
I’ve thrown my down because I would like to know as well, but in the meantime…
What are you trying to do? Maybe there is another option.
I am trying to get SysRowID in order to send it to erp-rest call.
Place from where I am trying get SysRowID depends from where user is in application.
If sysPages.epBinding equals LandingPage.CusID then I need to take SysRowID from LandingPage.SysRowID, but if sysPages.epBinding equal Customer.CustID then my SysRowID is in Customer.SysRowID.
So I need to extract string to dot (either LandingPage or Customer) then add to such string “.SysRowID”. As a result I should receive string either LandingPage.SysRowID or Customer.SysRowID. I am also struggling with next step. I need to get value from DataView.Field pointed by string.
Step back one more step. Why?
Not sure what you mean?
Edit: But I think I can solve my issue by using simple switch. Still want to know about availability of string manipulation keywords/functions in App Studio.
None, really. There’s a split function, but that’s about it. And, if I recall, it didn’t behave the way I expected to, but was told it’s working as designed.
For stuff like that, I have a function library with “helper” functions that does stuff like parsing, splitting, substrings, etc.
Alternatively, you could hijack the expression field of a condition or otherwise and use Javascript to do it.
Just surround the JS code with #_ your code here _#
What‽
I was asking you to explain why you want to do this on a more broader level, in case there was
a better approach. The business problem vs the technical problem.
An interrobang in the wild! Wild!
I thought it was appropriate for the statement she made
I am also quite often using functions but this time I was trying to do as much as possible via App Studio.
For sure I will try that. I have already few ideas of where I can use it.
I know that sometimes issue can be solved with different approach but in this particular case I was trying to kill two birds with one stone. To find out what we can do with strings in App Studio plus use that knowledge to solve a specific issue. But seems that “pure” App Studio is again ‘quite limited’.
Pure App Studio* is a bad way of thinking.
You’re going to want most of your stuff server-side. AS is there to make things look pretty (lulz) and maybe some GUI-based rules or triggers which then get fed back to the server.
*I’m tired of writing App Studio out. Can we just start calling it AS from hence forth??
Looks like js but you are not using #_ your code here _#
. So how we should know which syntax, which language to use and where (within which widget and which field)?
BTW: eval() is also available in Python.
Still better than Application Studio but AS is also fine
I get it, I’m the same way. But I still get asked, and I’ve learned to do the asking.
Studio works for me.
If I’m being perfectly honest here… I have no fucking clue. I am a leaf on the wind…
eval() processes the statements within and returns a string. The #_ _# I think just executes Javascript. For some reason #_ _# wasn’t working so I tried eval() and it worked, so do with that what you will. It’s all a bunch of black magic and guesswork anyways.
It’s always going to be some form of Javascript within AS.
Nice!
Not so fast. Besides putting any logic in the UI that isn’t just UI-related being a poor practice, eval() will be curtailed according to the designer of Application Studio.