Show if constraints for row in table

Hi, is there a way to use a “show if” type constraint on a row in a table. We want to stop technicians from adding service tickets (one table) under a particular customer file (another table) but still want to be able to see past info. I tried using a security filter to block the customer rows but then it breaks all of the references to the old service tickets. This would be ok in sense as we can still see all of the old data but curious if there’s a way to do this without breaking the references.

Thanks in advance!

Solved Solved
0 9 363
  • UX
1 ACCEPTED SOLUTION

Thank you.

Is the " Not in System" also coming from the referenced table?

If so, please try in the valid_if of [Customer Name] column in the Service Ticket table

IFS([Date]>=“12/20/2020”, SORT(((Customers[Customer ID])-LIST(“Not in system”)), FALSE),
[Date]<“12/20/2020”, SORT(Customers[Customer ID], FALSE)
)

Any new records created from 20th December 2020, will not have option of “Not in System”, records created before 20th December will have the option displayed.

View solution in original post

9 REPLIES 9

More directly you can restrict the user’s editing access for that table as well

There are various ways to accomplish the same result, so provided you can be more specific on how to prevent the users access, we can advise more in detail.

Thanks Levent. Here’s an example:

3X_3_6_366e9be48e2e293282ebc01fc07df91431f6b84e.png

For a few different reasons we let technicians enter a “Not in system” customer for a short time. The form you are looking at is a service ticket. We want to stop them from using the Not in system customer moving forward but we don’t necessarily want them to stop seeing the old Not in system customer records. I suppose I could create a new slice of the customer table that doesn’t include the Not in system records but then the techs wouldn’t be able to reference the old records. When I try a security filter, it stops the customer from being used but it also breaks the references between that customer record and the associated service tickets. This isn’t the end of the world, I was just wondering if there was a method that wouldn’t break the connection.

Maybe you could try the following

In the valid_if of the [Customer Name] if you do not have any expression, you could have

OR( AND([Date]>=“12/17/2020” , [Customer Name]<>“Not in system”) , [Date] <“12/17/2020”)

This will prevent the user from entering the name “Not in system” from 17th December but will let the user view / edit previous records with that entry. The expression could be further modified based on more conditional requirments.

Thanks Suvrutt. I think this should work, but having trouble tweaking. From the Service Ticket table I can still pick the “Not in system” Customer from it’s ref column.

Could you please provide relevant details of how the [Customer Name] column is referenced? I mean expression your are using for this column and other any relevant columns settings for this column.

Hi Suvrutt, here is my customers table:

And here is the referencing Service Ticket customer column setup:

Essentially, I want to be able to see old Service Ticket records referencing the “Not in system” customer row from the Customers table.

But I don’t want the row to show up as an option when I pick a customer name when created a new row in the Service Ticket table.

Thank you.

Is the " Not in System" also coming from the referenced table?

If so, please try in the valid_if of [Customer Name] column in the Service Ticket table

IFS([Date]>=“12/20/2020”, SORT(((Customers[Customer ID])-LIST(“Not in system”)), FALSE),
[Date]<“12/20/2020”, SORT(Customers[Customer ID], FALSE)
)

Any new records created from 20th December 2020, will not have option of “Not in System”, records created before 20th December will have the option displayed.

Hi Suvrutt, this worked perfectly. The only tweak I made was I switched out the “Not in system” in the equation with the key value for that row. I really appreciate the help.

I believe I understand the syntax for the most part. Do you know where I’d find documentation on the “-” syntax in the SORT(((Customers[Customer ID])-LIST(“Not in system”) part of the equation?

Hi @Wallace_Service,

Yes, inserting key instead of “Not in System” was a good catch. Well done.

On your query about

SORT(((Customers[Customer ID])-LIST(“Not in system”) here is the explanation

  1. Customers[Customer ID] creates a total list of all customer IDs from the Customer Table

  2. LIST(“Not in system”) or more precisely LIST(" Not in System row’s key") substracts that key from the list as we do not wish that option available. We need to wrap the single key with LIST() because one cannot subtract text from list but a list from another list.

  3. The SORT() simply sorts the revised list in ascending alphabetical order of customer names. Now that you have mentioned about key column being different from customer name, I believe the expression could be revised to

IFS([Date]>=“12/20/2020”, ORDERBY(((Customers[Customer ID])-LIST(“Key of "Not in System Row in Customers table”)), [Customer Name], FALSE),
[Date]<“12/20/2020”, ORDERBY(Customers[Customer ID], [Customer Name], FALSE)
)

ORDERBY() is similar to SORT() but works with only keys.

Please try with the above expression instead of the previous one.

Please post back if you are looking for any more details.

Top Labels in this Space