For User types, I hope to add the is Me filter option.
This is similar to Assigness’s contains Me.
Could you please review if this feature can be added?
With the is Me filter option, various personalizations are possible.
The following is the case where I want to use is Me of User type.
I installed Fibery’s default template HR > Vacations.
When an employee registers for vacation, they are automatically registered in the Person field.
However, the Person field cannot use the contains Me filter option.
To provide a personalized board, they must manually register themselves in the Assigness field. This is quite inconvenient.
It would be nice if there was a function to automatically set default values, but I would like to add the is Me filter option to the User type.
Is it right that you are asking for two separate things:
the ability to set a default value (=me) for a User field
the ability to personalise a view so that only entities that meet the criteria “User=me” are shown
Is that correct?
If so, then I think the first is possible (with a bit of API/button work), but I think the second is only possible when using the Assignee field, but not when using another user relation field.
If you add that code to an action button, after you’ve pressed the button, the default value for any newly created entities will be set to be the user who creates the entity.
You can then delete the button
(you’ll need to change the App name, Type name and Field name to what ever is needed for your case)
the ability to personalize a view so that only entities that meet the criteria “User=me” are shown.
→ This is the feature I strongly want.
the ability to set a default value (=me) for a User field.
→ This is the desired function as an alternative because the first function is not available.
However, when using a button, the user must click without forgetting to click the button. This is still a little uncomfortable.
No, you have misunderstood my post. You only need to create the button, click it once, and then you can the delete button again.
The admin can do this, and from then on, the default value will always be set to whichever user creates an entity.
Try it!
Oh! I now understand.
Instead of using the HTTP API, it was conveniently set with a button!
but, I faced the last challenge.
Default values are not specified in assignments/assignees.
For other user fields, "value": {'fibery/id':'$my-id' } is well specified, but assignees are not.
I think the problem is because the code I had written assumes that the user field is set up to link to only one user. For the assignees field, it is actually a collection field, and so I think it needs to be done another way.
I’m not sure the right way to set the default value for a collection, but perhaps @Sergey_Truhtanov or @antoniokov might help out with some simple code to achieve it.