Parsing a String within HTML |
Parsing a String within HTML |
SadieJo |
Feb 23 2018, 12:09 PM
Post
#1
|
Group: Members Posts: 3 Joined: 23-February 18 Member No.: 26,598 |
I have need to be able to Parse a string and the available option I have is using HTML - due to the 3rd party application I am using - they allow HTML in their formulas. I need to be able to take a string "[name1, name2, ..., nameN]" and assign each to a variable. There would be at most 8 names within the string, in most cases the number would be 1. Is this possible using HTML? The 3rd party application I am using is Celoxis -- I am creating a custom field within Celoxis, the field I am creating is a "formula" type field - and in the formula you have the option of using HTML. Honestly - I am not sure if this is even possible...
|
CharlesEF |
Feb 23 2018, 01:31 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
HTML is not a programming language. You would need a server language (PHP, ASP, etc...) or client side language (Javascript).
|
Christian J |
Feb 23 2018, 01:35 PM
Post
#3
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Maybe you could use INPUT elements and their NAME/VALUE attributes, but I'm not sure I understood the question (not familiar with Celoxis) --where does the string come from, and what is the resulting variable used for if you can't use scripting?
|
SadieJo |
Feb 23 2018, 04:20 PM
Post
#4
|
Group: Members Posts: 3 Joined: 23-February 18 Member No.: 26,598 |
Within Celoxis formula field you can do Arithmetic, logical, relational, or check for null values. You can also include HTML Script. So I can check a value to see if it matches a specific string:
${entity.name eq string_variable ? "email_variable": entity.emailID} this is a celoxis statement that checks a boolean condition (checks to see if the name ='s the name in the variable) ---- if the statement is true - it sets an email_variable to the emailID. the problem I have -- the string currently has more than one name and I need to check each of the names. example of string --> [steve vicary, john doe, sarah johnson] the string at most can have up to 8 names, but in most cases it will have only 1 name. |
Christian J |
Feb 23 2018, 04:42 PM
Post
#5
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
With "HTML Script", do you mean plain HTML or something else, like javascript?
|
SadieJo |
Feb 23 2018, 04:52 PM
Post
#6
|
Group: Members Posts: 3 Joined: 23-February 18 Member No.: 26,598 |
Sorry - I think plain HTML - I have looked through the documentation - and the only thing it states is HTML, Javascript improvements to load data up to 30% faster.. doesn't state what is accepted. I have entered this into one of the formulas and it does work..
<a href="http://celoma01prd:8888/psa/project.View.wm?_src=dashboard&p_p_id=${entity.id}&tab=10062"> ${entity.name}</a> |
Lo-Fi Version | Time is now: 23rd April 2024 - 01:33 AM |