How to set a default image

Hi,
I am trying to realize a welcome screen. The idea is that this is placed in the lobby of a company and when there’s a meeting with a guest there is a welcom message like:
“Hello Tony Stark, your Meeting starts at.—” and a Logo of said Guest’s company would be displayed.
I can get all of this info from an airtable.
My problem is what happens when there is no current meeting being displayed. The Interface Asset I made will simply display nothing but I would like there to be some default content.
I was thinking of maybe a default image that would be toggled between visible and invisible. I just don’t know what to use as a trigger.

Any ideas?

Hi @maximilian.berthold and welcome to the Community!

It difficult to answer not knowing the exact Airtable and Experience structure but one way to go would be to work with conditions on trigger and actions.

Something like (rough draft):

  • have a column “visible” in your Airtable, set to a TRUE value for each meeting
  • have a Layer A in your XP to display a Meeting
  • have a Layer B in your XP to display a default layout when there is no meeting
  • when request is completed, use a binding on that “visible” value on the Layers A and B in order to display Meeting detail when there is one, and default when there is none

Don’t hesitate to give more details, maybe share Experience or Airtable :wink:

Kind regards,

Alex.

1 Like

okay, so the airtable has collumns that contain the simple information, i.e. the name of the visitor and teir companies logo. That info is simply taken from the table and put into a a text file and an image container respectively.
In order to decide which row of the table to display there is a row with starttime of the meeting. The next column has a formula in it that checks how many minutes there are left from NOW() until the starttime of the meeting. It has three results: “A” for current neeting, “B” for not yet started, and “C” for meetings that are in the past. The formula will return A from 30 prior to until 30 minutes after the starttime.
Assuming that there will never be more than one guest at the same time the IA acesses the table and requests one row that has an “A”.
So when there is no item with an “A” in the table the refresh request comes back with nothing.

The tabel is here:

The experience is here:
https://cancom-my.sharepoint.com/:u:/g/personal/maximilian_berthold_cancom_de/EWe-jBlqwz9NvGwlwdVYrxsBWuCXa5HNd6h2XkUbH1hYJQ?e=j6g7sd

From a programming standpoint i would do something like:
if (textfield == empty) then (display default layer)

But I don’t know how or if something like that is possible in intuiface.

Hi @maximilian.berthold

Here is one method, there might be several other ways:

  • create a Global Variable “IsMeeting” for instance
  • use a binding from the first record column “Visible” to this variable

By doing that, after a request is completed, “IsMeeting” variable will either have a value equals to “TRUE” (because you set it like that in Airtable for every meeting) when a Meeting is supposed to happen, either it will have another value (probably empty) when the requests returns nothing (no meeting planed).

Now, create a couple of Trigger/Actions on the “IsMeeting” variable with condition. It will look like this:

WHEN (Value changed AND “IsMeeting” equals TRUE)
THEN Show Layer A (where you display a meeting), Hide Layer B (Default display when No Meeting)

WHEN (Value changed AND “IsMeeting” not equal to TRUE)
THEN Hide Layer A (where you display a meeting), Show Layer B (Default display when No Meeting)

Text explanation may seem long but don’t worry, it’s just a few clicks and will take a minute to set up :wink:

Kind regards,

Alex.

Hi,

sounds good! Unfortunatly it does not work.
It works nicely when switching from “No Meeting” to “Meeting” (i.e. when “isMeeting” is set to “true”)
But not the other way around. How does intuiface handle empty fields if it tries to check the contents?

What I have tried is simply toggling the layers on “Value changed” which worked but is not failproof enough for my liking.

Edit: I found a workaround. Apparently the statemant [“isMeeting” not equal to “true”] does not return a TRUE if the field is empty (or does not yet exist).
I made a second Global variable to store the information. And tied the decision whether or not to switch Layers to that second variable rather then the InterfaceAsset.

Hi @maximilian.berthold

Edit/Disclaimer: you will find a simpler and refined version on the message after this one, check here.

That was a tricky one but I think I finally tamed Airtable! :slight_smile:

The problem we have here is that Airtable is returning no value when the request as no records.
This is translated in API Explorer answer by missing fields and when you use a binding on a missing field, its value is “null”.

The workaround I used:

  • have a Global Variable (I named mine Record ID Length) with a binding to the id of the first record returned by the request (we get rid of that extra column I used in the message above), it will look like this

  • on that variable, add a custom converter. As we have issues to interpret/evaluate that “null” value, we’re going to circumvent this by working with its length. The custom converter will be:

By using that (INPUT+"0").length converter, we now have only 2 possible results:

  • either the request return no record (= no meeting), value in answer is “null” and the Record ID Length will have a value of 5 (= concatenated “null0”)
  • either the request returns a record because there is a meeting, value in answer will be something like “rec12345678” and Record ID Length will NOT have a value of 5

Now just add the 2 triggers/actions on the variable, as explained in the message before:

  • when value changed (and is equal to 5) do something
  • when value changed (and is NOT equal to 5) do something else

And voilà ! :tada:
Alex1-Airtable0

Not the most elegant, but we tamed Airtable ! :wink:

I’m adding to this message the sample I’ve created, feel free to download and dig in.
Community-ConditionalAirtable.zip (6.2 MB)

Kind regards,

Alex.

1 Like

I’m adding a much simpler and refined version based on the previous one.

The trick is to use a binding between the first record and the visibility of the Display Default layer, with a converter Is equal to “” (empty), like this:

The process will be: if there is a record in the request answer, there will be a record id value, then the converter is not equal to empty, then it will return FALSE, and consequence is: visibility of the Display Default will be set to FALSE, hence, not displayed.

For the other layer, Display Detail, we just use a binding to the visibility of the Display Default with a Math converter “NOT”, like this:

Consequence is, when one layer is visible, the other isn’t, and vice-versa.

Here is the refined version.
Community-ConditionalAirtable_Refined.zip (6.2 MB)

I have been working on this project a little more.

And I cannot get it to work reliably.

Here is the issue I keep having:
I am trying to use the record ID value to decide whether or not there is a meeting scheduled. The problem is that Intuiface (or at least composer) keeps insiting that there is a value for that.

I am assuming it is storing the last value it received somewhere. Therefore my “isMeeting” variable does not change and therefore the switch does not happen.

Any more ideas?

Hi Max,

I recommend you to open a ticket on Support and share everything you have in the ticket: Experience, Database at Airtable, explanations etc.

Community is fine for tips, tricks and sharing here and there, but for such specific issue we need a more in depth investigation and follow-up, let’s head to Support :wink:

Cheers,

Alex.

1 Like