Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

AQL that returns all attributes where value is TRUE (boolean type)?

Barret Margin Jr July 5, 2024

I am working on a HR portal/project that is connected to JSM Assets.  One of the object types is Role where I have a matrix of what company resources is needed for that role.

I'm struggling with creating a query that will return all attributes for that role where the value is TRUE.

Let me know your thoughts or any questions you may have. Thank you!

2 answers

0 votes
Mark Higgins
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2024

Hi Barret,

I think I know what you are attempting to do, but I'm going to para-phrase it?

My assumption is that you have a custom field that selects a role.

We do something similar once an employee has their assets, so that we can show all their assets when required.

This is acheived as each particular schema has the attribute 'User', which is the Atlassian ID, and therefore we can through the schema, looking for all rows, where the user id = {reporter}

 

ObjectSchema = 'Object Schema Name" and User."Atlassian Account ID" == ${reporter}

 

Appreciate that you want to set a value to True?

What does that schema look like?

I'd understand if you didn't want to duplicate every 'Asset' for every role as well.

Regards

 

Mark

 

Barret Margin Jr July 9, 2024
The schema is like this:

{
"Job Title": Text,
"Auto Policy": boolean,
"Business Card": boolean,
...
}

 Basically my 'Role' object is a list of roles we have in our company and then attributes associated to that role of boolean value.  So if we hire/someone leaves, we know what should give them access to/revoke.  

From the submitted form, based on the role selected, I want to gather a list of all attributes that are true for the role. If not possible to only return attributes that have boolean value true, that's fine.  I see from the form I can always just open the graph of role and shows all attribute values.

Screenshot 2024-07-09 085917.png

Like Mark Higgins likes this
0 votes
Kris Dewachter
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2024

Hi @Barret Margin Jr ,

Welcome to the Community.

I'm not sure I understand your question correctly. Do you want to create an AQL query that finds your object(s), where any of their attributes is TRUE ?

If so, I don't think AQL supports that. You will have to include all attributes indivudually in the AQL.

 

Best regards,

Kris

 

Barret Margin Jr July 9, 2024

I have defined the role already from the custom field. For that role, I only want the attributes of boolean value "TRUE".

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events