Enumerate UI controls in a view

  • 0
  • 1
  • Question
  • Updated 10 months ago
  • In Progress
Is there an API that will allow me to enumerate all the UI controls in a view. I wish to get the IDs, names, values, etc.

Thanks
Ralph
Photo of Ralph Krausse

Ralph Krausse

  • 160 Points 100 badge 2x thumb

Posted 10 months ago

  • 0
  • 1
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,756 Points 5k badge 2x thumb
I am not aware of such APIs to get that information. But, yes, you can get that information by just inspecting that particular UI element.

Thanks,
Gaurav
Photo of Ralph Krausse

Ralph Krausse

  • 160 Points 100 badge 2x thumb
What if I do not know the ID. How can I get a list of IDs?

Thanks
r
Photo of Gaurav Sharma

Gaurav Sharma

  • 5,756 Points 5k badge 2x thumb
I am not sure what are you talking about? but, you can get the id like this.

Photo of Gaurav Sharma

Gaurav Sharma

  • 5,756 Points 5k badge 2x thumb
or you can use the View Source Chart plugin in Firefox. It will give you the full source HTML structure of any web page.
Photo of Ralph Krausse

Ralph Krausse

  • 160 Points 100 badge 2x thumb
I need to get it programmatically, via an API. Someone else is in charge of the quickbase forms, not me so that can change at any point.
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
API_GetSchema will provide you the tables, field IDs, and field names.  
https://help.quickbase.com/api-guide/index.html#getschema.html%3FTocPath%3DQuick%2520Base%2520API%25...

Then combined with your normal Queries to get the values you are looking for.

The form elements can be captured and edited, but only using a virtual machine.  Its pretty tricky, and you would need to have a strong use case for the need to pull/manipulate that information.
Photo of Ralph Krausse

Ralph Krausse

  • 160 Points 100 badge 2x thumb
AWESOME, thanks. I will check it out.
Photo of Ralph Krausse

Ralph Krausse

  • 160 Points 100 badge 2x thumb
I just tried that but unfortunately it doesn't get all the data. I am specifically interested in Section Heading information.

Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
Section Headings on a form are not part the schema, but part of the service, and the only way to pull that is by pulling the logs when you submit the request to edit the form.
i.e. ?a=DformProps&dfid=2

I have to ask, Why do you need the form headings via the API?
Photo of Ralph Krausse

Ralph Krausse

  • 160 Points 100 badge 2x thumb
So this is my query

https://abc.quickbase.com/db/bminxc2uf?a=DformProps&ticket=XXX&ap...

But I am still not getting the sections headers and I am not exactly sure what I am looking at.

Why do we need this?

We run reports against the data in QB but I can't manage what I want in the reports while in QB, so I am creating a web site that will extract all the QB data and let me manages what data I want in it and what data I do not. 

I can't make QB do what I need it to do with JS,

Also what do you mean by "pulling the logs" 
(Edited)
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 26,372 Points 20k badge 2x thumb
>Is there an API that will allow me to enumerate all the UI controls in a view

It isn't clear what you are looking for. "Controls" normally refers to form elements such as <input>, <textarea> etc on a form but these elements are on present on a view page (they display on an new or edit page). On the other hand the screenshot you posted suggests that you want to grab the essential data associated with a form editing page such as section heading text. In either case you can easily get this information using JavaScript although by different means.

The general idea is to load the page in question into a hidden <iframe> and when it loads you use jQuery's serializeArray method or the FormData API to grab a representation of the form's state as either an array or object.

 https://api.jquery.com/serializeArray/

https://developer.mozilla.org/en-US/docs/Web/API/FormData