justinmind-logo
 
Upvote 1

Datagrid - setting value to element inside a cell

Solved Green Zhukovsky 5 years ago

I create a Data Grid with a list of friends of a given (by variable) user.

I have a Data Master called Users, where (among other fields) I have a user ID and a Friends field, which contains comma-delimited list of this user's friends; So I set the current User ID in another place and want to display the list of this user's friends. The simple FILTER(UsersDataMaster, (FriendsField HAS CurrentUserId)) does the job good and I have only the friends left. Here comes the BUT:

I don't know the length of each friend's first name and last name. Therefore, if I want to display it beautifully, I want to add a Text label to a cell, and set its value onPageLoad to users.first_name CONCAT ' ' CONCAT users.last_name - and it does not work, setting the same value for all of the cells (the first and last name of the first user in the list).


I went on exploring it and noted that it works perfectly if the Data Grid is not filtered. If it is - I get the described behavior. Moreover, if I set the same action on the Text Label click event - the resulting value is right.


I've tried to change the action's (filtering and setting value) order, with no luck. The reproducing example attached below. Any advice?

Best Answer
photo

We just needed to change the second action that concatenates the names to be On Data Change, rather than On Page Load.

Replies (1)
photo
2

We just needed to change the second action that concatenates the names to be On Data Change, rather than On Page Load.

photo
2

worked perfectly, thank you!

photo
Leave a Comment
 
Attach a file