Visibility Condition for buttons by latest record

0
Hello all, I want to show my buttons as my latest condition changes, For example, If I click on Check In button then A record for check in will created. Now as the latest record is ‘check in’ then screen should show the Check out Button. Now again as i click on Check out button then it will create a new record Check Out. So, now the button should be Check In as the latest entry is Check Out.     How can I achieve that? I’ve used data containers but it is only fetching the first record not the latest record. Please Help
asked
5 answers
1

Hi Dev,

Place your buttons in data view, set the source as microflow in that retrieve latest record and set as return,

set the visibility to the buttons based on status.

 

for checkout button, set visibility if the status of last record is only check in,

for check in button , set visibility if the status of last record is only check out,

for break out, , set visibility if the status of last record is only  break in,

for break in, , set visibility if the status of last record is only  break out.

 

 

answered
0

Hi Dev,

You can use a non persistent helper entity here. This can be created when you open the page and used as a dataview around the buttons. On the entity you set an attribute called CheckIn (boolean). Now you can set the visibility of the buttons to: $helperentity/CheckIn. If it's true: show CheckOut, otherwise show CheckIn.

Hope this helps!

answered
0

Hi Dev,

You can use a non persistent helper entity here. This can be created when you open the page and used as a dataview around the buttons. On the entity you set an attribute called CheckIn (boolean). Now you can set the visibility of the buttons to: $helperentity/CheckIn. If it's true: show CheckOut, otherwise show CheckIn.

Hope this helps!

answered
0

Hi,
Can you share the Screenshot of the page and microflow you are using.

Based on my Assumption, You can enable Store Created date system member in the Entity.  In your, Microflow use the Retrieve from Database option and Select first as range In the filter set Created date to Descending. Based on the Last value updates the Boolean Value and Show the button accordingly.

answered
0

 

this is my screen, and as you can see there is a expression which is taking the first record not the last record.

How can I achieve that?

this is my check in microflow :

 

this is my working screen:

answered