Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Julius Dickens
0
Views
2
Comments
Can I pass text string from query into Value of Expression in ListRecord?
Discussion
How-to
Hi All,
Just recently ran into an issue. When I input
ListRecords1.List.Current.LISTING2.HSN
into the value field for an expression of ListRecords1, the runtime result is great. If I return
ListRecords1.List.Current.LISTING2.HSN
either from a static entity or a simple query and place the result of the query into the "Value" field, at runtime all I get is "
ListRecords1.List.Current.LISTING2.HSN"
in the resulting Html. I feel like im missing something simple. How can I turn a query output of text string back into a value that behaves properly at runtime?
Thanks,
Julius
João Rosado
Staff
Hi Julius,
You can't convert strings in runtime to the actual expressions values. Expressions need to be validated in design time (to guarantee type safety) and evaluated in compile time (compiled code for performance and protection against security issues like code injection).
So a string from a query (or any other source) in runtime will not work as an expression evaluated at runtime.
What are you trying to achieve? Can't you just use If widgets to model the different possibilities?
Regards,
João Rosado
João Fernandes
Hi Julius,
I'm sorry but I can't quite understand what your problem is.
Please see this video on how to
List Records from the Database
. Although the video uses a TableRecords, the procedure is the same for ListRecords.
If you haven't already, I would suggest following the
Academy training videos
from the start. They will probably answer your doubts regarding how to fetch and display data, customize screens, implementing server-side logic, ...
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...