# Agent for information

**URL:** <https://community.glideapps.com/t/agent-for-information/29981>\
**Category:** Ask for Help\
**Tags:** custom-code\
**Created:** [August 4, 2021, 11:33am UTC](https://community.glideapps.com/t/agent-for-information/29981 "2021-08-04T11:33:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 11:33am UTC](https://community.glideapps.com/t/agent-for-information/29981/1 "2021-08-04T11:33:43Z")

</div>

Hello,  
When troubleshooting a user, it can be helpful to know their system configuration.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/2/d2845b4a48006c4a07c4ce334164c32a03cee557.png)

Link for YC  
[https://Agent.manun2.repl.co](https://Agent.manun2.repl.co)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 4, 2021, 11:45am UTC](https://community.glideapps.com/t/agent-for-information/29981/2 "2021-08-04T11:45:38Z")

</div>

Does this mean you can theoretically display something on an OS and another one on a different OS?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 4, 2021, 11:49am UTC](https://community.glideapps.com/t/agent-for-information/29981/3 "2021-08-04T11:49:47Z")

</div>

I’d like to test this one, could you provide the forking link please?

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 11:51am UTC](https://community.glideapps.com/t/agent-for-information/29981/4 "2021-08-04T11:51:08Z")

</div>

> **[Agent](https://replit.com/@ManuN2/Agent#function.js)**
>
> Public

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 11:53am UTC](https://community.glideapps.com/t/agent-for-information/29981/5 "2021-08-04T11:53:13Z")

</div>

> [@ThinhDinh](#):
>
> Does this mean you can theoretically display something on an OS and another one on a different OS?

??  
The agent returns the customer information.  
I did a test on my laptop and got feedback from my device and the operating system.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/1/d1e0323b5cd0d90d27e0f79e94c53911d1fae5de.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 4, 2021, 11:55am UTC](https://community.glideapps.com/t/agent-for-information/29981/6 "2021-08-04T11:55:05Z")

</div>

I mean does this system agent provide information about whether they’re on mobile/desktop, iOS/MacOS/Android? If so, can we use visibility conditions based on this to display different things to different OS?

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 11:57am UTC](https://community.glideapps.com/t/agent-for-information/29981/7 "2021-08-04T11:57:56Z")

</div>

I think so  
you just have to make a selection. it may not be easy (I am thinking of the case of iOS)  
I don’t have rotten apples for testing

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 11:59am UTC](https://community.glideapps.com/t/agent-for-information/29981/8 "2021-08-04T11:59:38Z")

</div>

Please give feedback on different system if you want to move the thing forward.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [August 4, 2021, 12:00pm UTC](https://community.glideapps.com/t/agent-for-information/29981/9 "2021-08-04T12:00:02Z")

</div>

Nice!!

You can use the Hell Yes-Code template (or your own version) to write the code directly and get the result faster. Well, it’s my point of view… I prefer to use HYC template and avoid creating too many templates for each case 😇

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/8/085ca9f72f4f6004f22d661706179b8d5af7eaed.png)

Saludos a todos

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 4, 2021, 12:00pm UTC](https://community.glideapps.com/t/agent-for-information/29981/10 "2021-08-04T12:00:54Z")

</div>

I just did a quick test with my IOS device.  
I tried adding the result to a Rich Text component.  
In the builder, it displayed fine and showed the details of my Macbook browser (as expected).  
But on my IOS device, the component didn’t display - which suggests that the column was probably empty.

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 12:02pm UTC](https://community.glideapps.com/t/agent-for-information/29981/11 "2021-08-04T12:02:12Z")

</div>

> [@ThinhDinh](#):
>
> I mean does this system agent provide information about whether they’re on mobile/desktop, iOS/MacOS/Android? If so, can we use visibility conditions based on this to display different things to different OS?

> ```auto
> function detectMob() {
> const toMatch = [
> /Android/i,
> /webOS/i,
> /iPhone/i,
> /iPad/i,
> /iPod/i,
> /BlackBerry/i,
> /Windows Phone/i
> ];
> 
> return toMatch.some((toMatchItem) => {
> return navigator.userAgent.match(toMatchItem);
> });
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 12:07pm UTC](https://community.glideapps.com/t/agent-for-information/29981/12 "2021-08-04T12:07:59Z")

</div>

there is that, obviously it returns win32, iPad | iPhone | iPod,  
to test !!

> navigator.platform

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 12:09pm UTC](https://community.glideapps.com/t/agent-for-information/29981/13 "2021-08-04T12:09:10Z")

</div>

According to my small research, I have seen no comments on the subject

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 12:13pm UTC](https://community.glideapps.com/t/agent-for-information/29981/14 "2021-08-04T12:13:28Z")

</div>

Ah yes thank you @gvalero  
I forgot.  
But I prefer to do several because as I am old I will no longer remember the code

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 4, 2021, 12:14pm UTC](https://community.glideapps.com/t/agent-for-information/29981/15 "2021-08-04T12:14:41Z")

</div>

Ah, it works… maybe I was just impatient.

 ![WhatsApp Image 2021-08-04 at 20.13.12](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/4/a49caa0a39f1d6dedb53fd3591800e00ffc6b4f2.jpeg)

This could be quite useful 🙂

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 12:16pm UTC](https://community.glideapps.com/t/agent-for-information/29981/16 "2021-08-04T12:16:51Z")

</div>

Good  
Then  
It may be necessary to do a little cleaning in all the information.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 4, 2021, 12:19pm UTC](https://community.glideapps.com/t/agent-for-information/29981/17 "2021-08-04T12:19:06Z")

</div>

I think device and browser are the two obvious bits that are most useful.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 4, 2021, 12:25pm UTC](https://community.glideapps.com/t/agent-for-information/29981/18 "2021-08-04T12:25:25Z")

</div>

> [@Darren\_Murphy](#):
>
> which suggests that the column was probably empty.

You said it was up some time later, probably worth adding my two cents here.

This morning, I tried sending to my webhook a column that is calculated based on Manu’s UTC time code the other day. That calculated perfectly fine in the builder but it is null when passed to the webhook.

I tried adding a few more columns based on that YC UTC column and they are all null going into the webhook. Something worth considering going forward.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 4, 2021, 12:28pm UTC](https://community.glideapps.com/t/agent-for-information/29981/19 "2021-08-04T12:28:44Z")

</div>

mmm, interesting.

The thing that changed here is that I created an if-then-else column so I could tell for certain if it had returned a result of not. eg:

 ![Screen Shot 2021-08-04 at 8.27.29 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/5/25b0f2aab9cdf2d44766e87b2e4d7329800490cb.png)

And then I used that column in a hint component.

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [August 4, 2021, 12:31pm UTC](https://community.glideapps.com/t/agent-for-information/29981/20 "2021-08-04T12:31:19Z")

</div>

> [@ThinhDinh](#):
>
> I tried adding a few more columns based on that YC UTC column and they are all null going into the webhook. Something worth considering going forward.

ah if you want to use a YC column in an action, the YC column must be displayed on the page. This is the only way I have found at the moment.  
It works, but you have to be careful with this operation.

Nb:  
I think @Mark is growling with my post and he will tell us again that we cannot use YCs in an action.

[Next page](https://community.glideapps.com/t/agent-for-information/29981.md?page=2)
