Hide Field Editor when No Record Exists

  • 2
  • Question
  • Updated 6 years ago
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: Old Questions

Is it possible to have Skuid not display a field editor component if a record doesn't exist that meets the conditions of the model?

Thanks!
Photo of Peter Herzog

Peter Herzog

  • 1,704 Points 1k badge 2x thumb

Posted 6 years ago

  • 2
Photo of ktyler

ktyler

  • 9,274 Points 5k badge 2x thumb
Peter,
You could use the advanced properties of the field editor to give it an id (so you can modify it in javascript).
Then a javascript snippet could check on whether the model has a row using something like
skuid.model.getModel('Client__cData').data.length
and if the length is not greater than 0 you can hide the field editor

let me know if you need more help with the javascript
Photo of Drew Snyder

Drew Snyder

  • 252 Points 250 badge 2x thumb
Peter,
I am trying to do this too, but I don't know anything about Javascript. Luckily I have a Javascript coder sitting right next to me, but he doesn't have access to Skuid so Explaining to him what I want him to write is kind a hard.

I have an object that is related to the main object that I am using skuid to replace. It's not a child object and there can be anywhere from 2-20 of these "Tickets" attached to the "Project." I am trying to organized the Tickets by tab by using the record type. There is only one ticket per record type, but if the ticket doesn't exist it returns nothing when I preview.

Any help would be appreciated.

This conversation is no longer open for comments or replies.