Hi All,
There's this issue I'm facing where I would like to do multiple scenarios. Here are my business scenarios:
Data Source: SharePoint. Two Data sources:
SPList1
SPList2
Rules:
Check for TODAY if:
- User already has entry in SPList1
- If SPList1 Response of user = Choice 1
- Proceed to do navigate to Screen1
- If SPList1 Response of user = Choice 2
- Check first if User already has an entry in SPList2
- If with no entry, go to Screen2
- If with entry, go to Screen3
- If SPList1 Response of user = Choice 3
- Check first if User already has an entry in SPList2
- If with no entry, go to Screen2
- If with entry, go to Screen3
Basically there are three choices and some choices have branching conditional checks that will navigate to a specific screen. What I'm having trouble at is my lookup. I can look up the SharePoint data correctly but it seems that when I want to check if the lookup has value or not, it returns false even if there is a record there.
My Setup:
In the OnStart, I created a collection in the app to store data since it's from SharePoint and the lookup is non-delegable, AND set a variable to test the true or false of the lookup:
Concurrent(
ClearCollect(colWorkData ,Filter('Employee Workday Data',SPFlowID>=1&&SPFlowID<=2000)),
ClearCollect(colWorkData1 ,Filter('Employee Workday Data',SPFlowID>=2001&&SPFlowID<=4000)));
ClearCollect(colWorkDataCollection,colWorkData, colWorkData1);
Set(varWithWorkData, false)
In my first screen on the OnVisible page of Screen1, I've set up the following:
If(
IsBlank(
LookUp(
colWorkDataCollection,
Lower('Created By'.Email) = Lower(User().Email)
)
),
UpdateContext({varWithWorkData: false}),
UpdateContext({varWithWorkData: true})
)
Issue:
The first time I tried this, the value was always false when I tried without the Lower() function. But after adding the Lower() function, the value is now always true, even if I tried deleting my records in SharePoint (there are no records now there but this value is still true).
For now, I'm stuck with this and am puzzled why this is not working. My next step is to add the date today for the lookup since this is daily. Any help with this would be great.
Thank you