Hello.
I have a TAB that contains meetings.
Since this is a public App, People do not have to login.
I want to give people however the possibility to tell the app: "I will be there", but in an anonymous way.
In the meetings tab, I have the KEY for each line that contains a meeting.
Also, I know the DeviceID of the user.
(Yes, I know the annoying quirks of using the DeviceID, but that is okay)
My wish is to have a second TAB that is called (for instance) 'Tracking'.
When a user clicks one of the meetings, I want to show a "I will be there" button (action)
That button should only be shown if the user has not clicked the button before. (Read: If there is no row in the Tracking-Table with this meeting-key and DeviceID.)
When the user clicks the button, an entry will be made in the Tracking-table with the key of the meeting-row and de DeviceID.
For the user, the button will be replaced with: "Sorry, I decide not to come" and in that case the key-DeviceID combination should be removed from the Tracking-table
How can I make an action appear or disappear?
What is the query I have to do to see if this Meeting-Row/DeviceID combination exists in the Tracking table?
Hence......how do I make the "I will be there" action visible or the "Sorry, I decided not to come."?
I have been testing with for instance:
"I will be there"
==> Only if this condition is true
==> CONCATENATE([Key], " ", CONTEXT("DeviceID") <> CONCATENATE(ANY(table | Tracking[Action]), " ", CONTEXT("Device"))
"Sorry, I decided not to come"
==> Only if this condition is true
==> CONCATENATE([Key], " ", CONTEXT("DeviceID") = CONCATENATE(ANY(table | Tracking[Action]), " ", CONTEXT("Device"))
but that does not work.
.....help.....?
Solved! Go to Solution.
I have got this working.
(For some time now, but I forgot to update this ticket.)
ADDED 3 ACTIONS
I have om the CarMeetings table added two actions.
On the Tracking table I introduced the next action:
_______________________________________________________________
ACTION: "I will attent"
The action "I will attent" does the following:
So it creates a new row in the Tracking Table.
There is a confirmation note that asks if the user is really sure that he/she will attent.
The action will only be available if the following stetement is true:
NOT( IN([virtual | Key and DeviceID], table | Tracking[MeetingKeyAndDeviceID]) )
ACTION: "Update Tracking With No"
The action "Update Tracking With No" does only trigger an action on the Tracking Table.
References rows
SELECT(
table | Tracking[MeetingKeyAndDeviceID]
,[MeetingKeyAndDeviceID] = [_THISROW].[virtual | Key and DeviceID]
)
This selects the current meeting and sends that as operating data to the other action on the Tracking table.
The action will only be available if the following statement is true:
IN([virtual| Key and DeviceID], table | Tracking[MeetingKeyAndDeviceID])
There is a confirmation note that asks if the user is really sure that he/she will attent.
ACTION: "I will NOT attent"
The action "I will not attent" is a HIDDEN action.
The user will not be aware of this action.
The action will do the following:
The row deleted is selected by the action "Update Tracking With No".
The re is no rule and no confirmation
_______________________________________________________________
HOW DOES IT LOOK?
When the grid is shown:
The person icon with the plus sign will be able to tell the app that he/she will attent.
The slashed out person icon will tell the app that he/she changed it's mind and will NOT attent.
In detail view it looks like this:
_______________________________________________________________
Thanks to all people that helped me to accomplish this.
I'm happy with the way it works now.
_______________________________________________________________
Something like this maybe:
ISBLANK(SELECT(TrackingTable[key], AND([MeetingId] = [_THISROW].[MeetingId], [DeviceId] = CONTEXT("Device"))))
and
ISNOTBLANK(SELECT(TrackingTable[key], AND([MeetingId] = [_THISROW].[MeetingId], [DeviceId] = CONTEXT("Device"))))
I would think that if you reference connected these tables together, then you wouldn't need all that brute force with SELECT(); you'd have a [Related Trackings] VC on the meeting table, and out of this you could list dereference the list of devices.
IN(Context("Device"), [Related Trackings][Tracking_Device_ID])
Much more elegant.
Hi Matt,
(Long time no see)
I was trying this last week (so, yes, I had the same Idea .....kind off) and back then I created a virtual column in the meeting table that I called "virtual | Key and DeviceID" .
In there I put the key of the meeting row, plus a space, plus the DeviceID.
In my table it looks like this:
(Yes.....I have been learning from you, as you can see in the 'Optional" columns ๐ )
"1003" is the KEY in the Car Meetings table. Then a space. Then the DeviceID.
This looks like: "1003 cb7be53e-95a4-4d2f-994f-4f3dedabdf79"
But now........I am trying to find the correct info in the 'Tracking' table, based on the 'virtual column'.
This does not do the trick for me.
I tried to plot the suggestion you made:
IN(Context("Device"), [Related Trackings][Tracking_Device_ID])
...but I seem to be unable to translate that suggestion to my actual columns.
Would you please give me a push into the right direction?
Friendly greetings,
Rens
(The Netherlands)
ISBLANK(FILTER("Tracking", AND([Meeting Key] = [_THISROW].[Key], [DeviceID] = CONTEXT("Device"))))
NOT(ISBLANK(FILTER("Tracking", AND([Meeting Key] = [_THISROW].[Key], [DeviceID] = CONTEXT("Device")))))
I'm trying this @Sirfyaad , but only the first statement works. ๐
I have got this working.
(For some time now, but I forgot to update this ticket.)
ADDED 3 ACTIONS
I have om the CarMeetings table added two actions.
On the Tracking table I introduced the next action:
_______________________________________________________________
ACTION: "I will attent"
The action "I will attent" does the following:
So it creates a new row in the Tracking Table.
There is a confirmation note that asks if the user is really sure that he/she will attent.
The action will only be available if the following stetement is true:
NOT( IN([virtual | Key and DeviceID], table | Tracking[MeetingKeyAndDeviceID]) )
ACTION: "Update Tracking With No"
The action "Update Tracking With No" does only trigger an action on the Tracking Table.
References rows
SELECT(
table | Tracking[MeetingKeyAndDeviceID]
,[MeetingKeyAndDeviceID] = [_THISROW].[virtual | Key and DeviceID]
)
This selects the current meeting and sends that as operating data to the other action on the Tracking table.
The action will only be available if the following statement is true:
IN([virtual| Key and DeviceID], table | Tracking[MeetingKeyAndDeviceID])
There is a confirmation note that asks if the user is really sure that he/she will attent.
ACTION: "I will NOT attent"
The action "I will not attent" is a HIDDEN action.
The user will not be aware of this action.
The action will do the following:
The row deleted is selected by the action "Update Tracking With No".
The re is no rule and no confirmation
_______________________________________________________________
HOW DOES IT LOOK?
When the grid is shown:
The person icon with the plus sign will be able to tell the app that he/she will attent.
The slashed out person icon will tell the app that he/she changed it's mind and will NOT attent.
In detail view it looks like this:
_______________________________________________________________
Thanks to all people that helped me to accomplish this.
I'm happy with the way it works now.
_______________________________________________________________
User | Count |
---|---|
16 | |
10 | |
10 | |
8 | |
3 |