on 03-03-2022 6:46 AM
Hello,
Can someone help me? I would like to carry text string value to another text field, but before presenting it i would like to remove a certain number of characters from the beginning of the text. For example; text = "Number of Entries (without Filtering): 47:String" and i would like to remove "Number of Entries (without Filtering): " so that only the number (47 in this case) is displayed in my `dashboard` text field.
Many Thanks,
Ben
Hi Ben,
SAP Screen Personas Scripting Engine uses JavaScript, hence, you can use the language string manipulation tools.
In your case, the number comes after the ": " so you can simply split the string in half and take the number part.
A simple example:
var sString = "Number of Entries (without Filtering): 47";
var sNumberPart = sString.split(": ")[1] // this will give you "47" of type String that you can use it further
Hope that helps!
Best regards,
Krists Magons
SAP Screen Personas Dev Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krists,
This has worked perfectly, thank you. All i need to do now is string a load of other transaction codes into the script to gather multiple results based on one searching criteria, I.e. work centre 🙂
Many Thanks,
Ben
Benjamin Bowden,
you can easily use script to carry value from one field and make changes.
refer below link for basic info on scripts,
Thanks
RD
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.