After changing description example record, scaffolding uses another one

After changing description example record, scaffolding uses another one

  

Hi,

I've changed the description of an example record (see attached print), so that when I scaffold, a different name is being shown, but now the scaffolding is using a different record.

How can I indicate which record to use when scaffolding?

Hello Cyril, 

I just can't reproduce this behavior.
Scaffolding will always use the first TEXT field as the "name" (in the case of the detail page, for example).

So, are you sure that you didn't changed the position of the attributes in the entity?

Cheers,
Eduardo Jauch

Hi Eduardo,

Thanks for you're answer.

I am pretty sure I did not.

For your information, I am creating a List page, whereas the table is a reference table.

Furthermore, the scaffolding is using the second TEXT field "CreatedBy" that we've changed from User Identifier to a TEXT field.

Regards.

Sorry,

I just can't reproduce this behavior.
My scaffolding is always using the first Text field.

What version of OutSystems Server and Server Studio are you working on?

Can you provide an OML where we can see this behavior?

Cheers,
Eduardo Jauch

Hi Cyrill,

Can you check what is the Attribute that is selected in the Label Attribute Entity property? You can find it by expanding "More Options" on the Entity pop up you showed on your screenshot.

@Eduardo, I am using version 10.0.609.0 and attached you will find an OML named "Test".



@Jorge, I made a print screen of what you asked me.

Hello Cyril,

Without changing anything on your module, when I do scaffolding with your entity, I get the Description field as the first field in the Table Records, as it is expected, once it is the first Text Field in the Entity.

And I just realized that we may be talking about different things.
Can you post an image of what are you getting and explain what you want?

Cheers,
Eduardo Jauch

Hey Eduardo,

I see what you mean and I get the same thing when I scaffold the reference table, however I was talking about scaffolding another table that uses the reference table as a reference. In the OML I attached in my previous post, you will see the screen I scaffolded called "ISICCode Trans Code Suggestions", on that screen as indicated in the below print screen you see that the CreatedBy column of the reference table is being used and its not the first text field in the reference table.

Saludo.


Hi Cyril,

I think we solved the mystery...

This is happening because the scaffolding is not using the field you are thinking...
The "CreateBy" is coming from the "ISICCodeTransCodeSuggestion" entity, where it is the first Text field, not from the Reference table. 

Cheers,
Eduardo Jauch

Hi Eduardo,

To me it seems that it is actually coming from the Reference Table, see below marked in red. Check the OML and you will see what I mean.

ISICCodeTransCodeSuggestionTable.List.Current.Reference.CreatedBy


Solution

Hello,

Ok. I did some tests to remember a thing.

In the scaffolding, the system will try to use the first 4 attributes in the entity that are of a type it can display.

Because the first 4 attributes are Reference Identifiers, an entity that has two text attributes, it will join with the Reference table, in order to use the first Text field it finds. But the attribute must have LESS than 500 characters. 

As the Description has 1000 characters, it is not used, instead, the next attribute with less than 500 characters is used, that is the CreateBy.

If you don't have any attribute that meet those characteristics in Reference, it will use the next fields in the ISI... entity that can be show (CreatedBy). If you don't have any attribute like this, it will not allow the scafolding.

Cheers,
Eduardo Jauch

Solution

Hey Eduardo,


Thank you very much for the info, it now makes sense to me.


Regards,

Cyril