I have several formulas there were working fine before I had to do some troubleshooting after importing data into my tables.
Formula 1:
Name: Calc_Project Manager1
if(field(‘Lookup Role’) = ‘Project Manager’,concat(field(‘Lookup Role Assignment’),‘’),‘’)
Error message: argument number 2 given to operator = was of type text but there are no possible types usable here.
Formula 2:
Name: Project Manager
join(field(‘Calc_Project Manager1’),‘’)
Error: argument number 2 given to operator = was of type text but there are no possible types usable here.
Formula 3:
Name: Calc_Project Manager
filter(field(‘Lookup Role Assignment’),field(‘PM_Calc’) = ‘Project Manager’)
Error: argument number 2 given to operator = was of type text but there are no possible types usable here.
Formula 4:
Name_PM_Calc
filter(field(‘Lookup Role’), equal(field(‘Lookup Role’), ‘Project Manager’))
Error: argument number 2 given to operator = was of type text but there are no possible types usable here, argument number 2 given to operator = was of type text but there are no possible types usable here.
I am sure this is something simple.
The goal here is to identify who is assigned as the project manager in the list and create a formula field that will allow me to Group By the Project Managers.
Hey @MikeTran, try these formulas:
Formula 1:
if(has_option(field('Lookup Role'), 'Project Manager'), concat(field('Lookup Role Assignment'), ''), '')
Formula 2:
join(field('Calc_Project Manager1'), '')
Formula 3:
filter(field('Lookup Role Assignment'), has_option(field('PM_Calc'), 'Project Manager'))
Formula 4:
filter(field('Lookup Role'), has_option(field('Lookup Role'), 'Project Manager'))
Thanks Olga…These formulas “work” with no error, but are not giving me the result that I was wanting (and getting previously), which is just the one name of the “Resource” (person) who is assigned to the “Project Manager” role for that Project.
Instead I getting either the json or the entire list…
Here’s more information.
I have a “Project” table and a “Project Role Assignments” table. The “Project Role Assignments” table tracks the project team by their role assignment.
I need a view in the Project table that will allow me to “Group By” the person assigned to the Project Manager role.
Step 1 was to create a formula that will look in my Project Role Assignments" Table and select the name of the person assigned to the Project Manager Role.
Step 2 Because the resultant field cannot be use for the Group By feature, I needed to create additional formula fields that use the Join function to convert the Project Manager Field to Text so that I can create a view that will allow me to Group By the Project Manager.
Hopefully this is clear.
Hey @MikeTran, what I did was change the =
symbol to the has_option
function. This makes the formulas work. However, if you’re not getting the expected results, it could mean there are some issues with the logic of the formulas. Have these particular formulas worked for you previously in Baserow, or did you import them from a different tool?
Thanks Olga…
I FINALLY figure it out…I was linking my roles through three tables.
Tables:
Project
^
Role Assignments
^
Roles
I had to convert the Role fields to text in the intermediate Role Assignments table and that solved all my issues. I thought I was using best practice by using tables instead of single/multiple select, but creating all of these linked tables has made the learning curve steep for me!
TY! ![:pray: :pray:](https://community.baserow.io/images/emoji/twitter/pray.png?v=12)
1 Like
Glad to hear you’ve figured it out! ![:slightly_smiling_face: :slightly_smiling_face:](https://community.baserow.io/images/emoji/twitter/slightly_smiling_face.png?v=12)