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
Harry de Boer
1
Views
7
Comments
display current record
Question
LS
I thought that it should be simple to show the value of an entities attribute in a text with the expression widget. However - how simple it seems- I can't figure it out! Looked at the screens with a recordslist made by intelliwarp, but.....alas.. So the question is:
What''s the proper expression for showing the attribtue of the current record of an entity and what steps I must go throught to achieve this.
Regards, Harry
Miguel Seabra Melo
Hi Harry,
The expression changes depending of which variable the record resides in, but you should follow the variable name with
.YourEntityName.YourAttributeName
. So, if you have the record in a local variable callled
YourLocalVar
of type "Record" and RecordType "YourEntityName" it will be
YourLocalVar
.YourEntityName.YourAttributeName
EDIT: In the case of a recordlist that is being iterated by, say, a TableRecords for the current row being displayed you would have something like
YourLocalVar
.
Current
.YourEntityName.YourAttributeName
Current being a literal, i.e. doesn't change name depending on your entity/attribute name
The best way to check what variables (and their record types) are available to you to use in expression is to select "(Expression Editor)" from the property drop down and select from the scope tree in the form that opens.
Regards,
Miguel
Harry de Boer
Hi Miguel,
I tried choosing in the expression editor but there are only the entities I created and no variables of record type. Does this mean that I have to manualy create variables for all my entities if I want to display them? And how is this done through Intelliwarp: I don't see variables for the dataviews and edits for them?
Regards, Harry
Carlos Rocha
Hi Harry,
I will ask you to just double click in a Screen flow, you will see screens in that flow, now you need to drag an entity to that flow, this will make a list screen for that entity, after that if you rigth click on one of the attributes that appear in the created screen you can see a option that states Link to new 'xxxxxxxx_show' this will make the show screen. here you can see how to show attributes from a record and how to do it with inteliwarp.
Regards,
carlos Rocha
Harry de Boer
Hi Carlos,
I can see how this is working with Imtelliwarp, it is creating the the localvar of type record. My question however remains: How do I show values of an entities attribute in a text without going to the manual proces of creating local variables for each entity. The reason why I ask this is that we want to use dialeroutbound scripts where callcenteragents follow scripttexts with datavalues in it.
I tried to use a recordList widget with some text but this isn't working because the upper row cannot be deleted.
If this is not possible without localvars, it would be nice to have an intelliwarp way: dragging an attribute to an expression widget (which handles the creation of the var).
Regards, Harry
Carlos Rocha
Hi Harry,
I'm not sure if I understood your question, but I think that you will allways need to store the data in variables, otherwise how do you know the values to place in the expressions?
if your problem is the variable of the type record, keep in mind that if you are using simple queries to retrieve the data they will not return all the reccord, and you can always create structures and use them into advance queries to only have the variables that you need...
if the problem is the variable creation, keep in mind that the service studio does that process almost automatically, so you don't need to create all the local variables for all the things that you need, if you do a query or call an action in the preparation that output can automaticly be used as variables in all the screen.
Regards,
Carlos Rocha
Harry de Boer
Hi Carlos,
>>
if the problem is the variable creation
, keep in mind that the service studio does that process almost automatically, so you don't need to create all the local variables for all the things that you need, if you do a query or call an action in the preparation that output can automaticly be used as variables in all the screen.
Yes, that was the problem, but I overlooked completely the ' query in the preperation' way of doing this. Thanks, this really helps. However, one more question: The data I use in most screens of the app (can be 20). Is there a way to do a kind of preperation for the session? Otherwise I have to make the same preperation for each screen. Or another way perhaps?
Regards, Harry
Carlos Rocha
Hi Harry,
No there are no other way, you need to do that on each preparation. the only thing that you can do if the preparation requires special treatmant ( iteration of the returning querie and stuff like that is to create a action that does that and just use that action in all preparations....
otherwise doing that will have no benefit.
keep in mind that have sessions with massive data will increase the view state and slows down the application.
Regards
Carlos Rocha
EDIT: if you data is the same, you can copy /paste the query in all preparations :)
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...