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
Walter Neto
4
Views
3
Comments
Batch update using For Each - not working
Question
Hi,
I am a new developer experimenting OutSystems.
I imported a excel file with clients and one field was detected as decimal, but in fact is a text.
I tried two things:
1) Changed the entity attribute to text type, but the conversion added a several zeros (.000000) to the field.
2) I wrote a Screen Action, querying the entity and using a For Each, Assigning the expression IntegerToText(DecimalToInteger(ClienteTable.List.Current.Cliente.CNPJ)) and then saving using the entity UpdateClient action. This second tentative is not working and I don´t know why (probably I am not doing it right).
Can anyone help?
Attached is the print screen of the Action (that is linked to a button in the Client_List screen).
Regards,
Walter
Screen Action to Batch Update.png
André Vieira
Staff
Hi Walter,
You can open your excel and edit the value in the first row of data, e.g.: instead of 3,14 you enter '3,14. This will force that value in Excel to be a text. That way when you import it to your text field it should remain a text.
João Rosado
Staff
Hi Walter,
As for the "2)" option:
You say your expression is "
IntegerToText(DecimalToInteger(ClienteTable.List.Current.Cliente.CNPJ))", but the assign is assigning the "GetClients2.List" and not
"
ClienteTable.List". Sure you didn't want to use the same list?
Regards,
João Rosado
Walter Neto
João,
I just changed to your suggestion, and the problem is with the expression, since it updated the records to Zero.
My logic with the GetClients2.List (I know now that ClienteTable.List has the same content) has the same problem, the expression is updating to Zero.
Conisdering the value
62,510,318,000,170.00 and that I want to update to
62510318000170, what are the best aproach?
Regards,
Walter
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...