i am trying loop through the each row in the excel but foreach is not working .
Discussion posts and replies are publicly visible
Within your foreach expression, you should use 'fv!item' to inspect each row of the item. It looks like you are trying go use pv!excel_data
after changes also it is not working.
What are you trying to achieve in this logic?
i am reading from excel file and updating the working and non-working days in the calendar.
If possible, try pasting your datasubset data into the expression rule so you can test more quickly. You should be able to see each row being processed in the loop if you only use fv!item in the expression.
No errors. still not working.
I think there's a couple of problems here:
First, I don't think the data you pasted in from your process is correct. Usually if you have `values=Text` in your process data, this actually means {values: "Text"} in an expression.
Second, even if you were indexing the correct data, I don't think your extract will give you what you want. I'd recommmend testing this on a single item to make sure it returns correctly. Here's my attempt to replicate your issue - notice that it actually returns "n-Working Day" which will never match the logic in your if() statement:
Keep in mind that a!forEach() actually just applies your expression to a list - so if your expression doesn't work for a single item, it's guaranteed it won't work on a list.
can you help for the expression to extract the date from datasubset in correct format?
Can you clarify what information you're trying to get from the text input in your screenshot? From the current logic there, the output is what we'd expect to see.
if condition returns "Non-working Days" if it found the same in the datasubset, otherwise "Working Days".
Let me re-phrase... how exactly is the code in your screenshot not working in the way you expect?
As an aside...it would be easier for people to help you if you posted your code as code (as opposed to screenshots) that we can copy/paste into our expression editors so we can change and return you an updated version. Post code as follows:
the code in the above screenshots working fine. The reason i posted here is, i just want you to make sure that nothing is going wrong while reading working and non-working days from data subset. Sorry, i was not aware of inserting the code directly instead of screenshot.
can i get me the expression to extract date from the datasubset? Thanks.