Jump to content

HTML syntax displaying instead of field value


Recommended Posts

So when my table used a lookup, I could return the string value in HTML for any given field by putting the change inside as follows: [@lookupfield:PW_tbl_roles_Skill[@field:skillpassport_change1#]]

But now my field just returns the html syntax. So if change is 2, I get [@field:PW_tbl_roles_Skill2] outputted.

My prior table used an integer. I tried casting in sql and inputting the calc field, but I still only outputted the html syntax.

Any ideas? I'm reluctant to use sql because it needs to be done 8 times with 45 possible combinations, and I'm really trying to speed this page up not slow it down with more calcs. 

 

Link to comment
Share on other sites

It seems like you're facing an issue with returning the string value from a lookup field in HTML format. The problem occurs when the field returns the HTML syntax instead of the actual string value.

One possible solution is to modify the lookup field syntax to extract the desired value from the HTML output. Here's an example of how you can achieve this:
[@lookupfield:PW_tbl_roles_Skill[@field:skillpassport_change1#]@html:1]

 

In the above code, the @html:1 parameter is added to the lookup field syntax. This parameter tells the system to return the HTML output as a string, rather than rendering it as HTML. By doing so, you should be able to retrieve the actual string value from the lookup field.

If the above solution doesn't work, another approach could involve modifying the SQL query to fetch the desired value directly without the need for additional calculations. Although you mentioned concerns about performance, optimizing the SQL query might still be a viable solution. If you provide more details about the database schema, table structures, and example queries, I can assist you in optimizing the SQL query to fetch the desired values efficiently.

Please provide more information about your database structure and any relevant sample queries if you would like assistance in optimizing the SQL approach or if you have any other questions.

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for the attempts. I still can't get it to work and have used the 8 fields - 45 case when in sql as a workaround but in the interest of page load I'm still keen to work this out if anyone has suggestions.

So employees in another form have selected up to 8 skills to update - and these are stored 1 to 45. So I have change1, change2, change3 etc and these fields say which skill from 1 to 45 was being changed.

Then the manager's form used 

[@lookupfield:PW_tbl_roles_Skill[@field:skillpassport_change1#]] to return the correct skill. So if change 1 was 43, it would return the description for Skill43.

Unfortunately, now that I no longer using the lookup table, and I'm storing the string, this doesn't seem to work. Instead of returning Skill43, it returns [@field:PW_tbl_roles_Skill43]. So I know its done part of the syntax, but just not returned the value.

When I tried adding the html:1 also just displayed as follows: [@field:PW_tbl_roles_Skill43@html:1].

I know the suggestion said to use Lookupfield but this isn't a lookup table anymore. I've had other fields work without lookup tables, for example this works wonderful for class formats and hiding blocks of fields when the value hasn't been selected, and I'm wondering if the issue is between string and integer/number. Skill is now a text field, and when it last worked it was a number lookup that returned a string. And my other instances are either no value (eg class statements) or number to number / integer to integer.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...