Hi Community,
I have a problem which is cannot find a way to compare user input matches with entity record data .
I saw some posts saying using BinaryData api to convert text to Binary and compare the two records.
Is there other ways to compare user input with entity record data?
Best Regards,
Wen Kai
Hi Wen,
Can you provide more details, so that we can help you answer your question...
Marvei
Hi Marvei Nii San,
My scenario is user need to key in two input fields to verify their details for this web screen.
Two input fields is for user to enter their details.
May i know how to compare the user inputs with the user details in the entity?
Is there any function to compare them?
you can use the input property typed value and use it to filter the aggregate.. for example, Input.typedvalue = aggregate.name
let me know if this is what you are looking for
If I am not wrong you want to compare the input value with the Entity.
You can compare as below:
toUpper(YourEntitiy.Attribute) = toUpper(InputValue)
Regards
Hi all!One approach is you can compare those two inputs using the Aggregate Filter of the aggregate where the User Details is located.
As for the filter parameters:User Input 1 [logical or comparison operator] User Input 2 = Entity RecordKind regards,Joseph Enriquez
You can use the following Forge component to compare records of any entity.
https://www.outsystems.com/forge/component-overview/3756/entity-compare
Wen Kai wrote:
Hi Wen Kai,
Please refer below post
https://www.outsystems.com/forums/discussion/36305/string-comparison/
Hope this will help :)
Amit Verma
Hi Guys,
Sorry for the late reply.
Thanks for the great help!
I tried Input.typedvalue = aggregate.name for the filter of preparation of aggregate.
I use compare toUpper(YourEntitiy.Attribute) = toUpper(InputValue).
When i debug the entity attribute is blank, how do i compare the entity.attribute base on userid?
i get the error [ entity ] with key 0 was not found.
Thanks everyone
Hi Wen!If you're trying to filter an Aggregate using UserId, you can compare UserId variable = Entity.Attribute where the UserIds are located.
If you're trying to filter an Aggregate using the UserId of the current user, you can use GetUserId() = Entity.Attribute where the UserIds are located.Kind regards,Joseph Enriquez
Hi Joseph Enriquez,
This screen is when users are not log in which verifies them by username.
Username pass from the previous screen to this screen which i working on.
I convert Username to userid through
User_GetIdByUsername(Username)
I use the aggregate filter, userid = ExtendedEntity.UserId.
Now i can pass the input value inside,but the comparing of entity record is blank.
When i change the test values inside aggregrate and save it,it will work.
But when i change the values,it won't work.
May i know is my assignment wrong?
Thank you.