Hi,
I am trying to write an if statement to populate the 'Event Start Date' from my 1st list('Event Information'). I have two lists. List1('Event Information') is a parent list and List2('Checklist Details') is the child list. It is a one to many relationship between the two and the ID from 'Event Information' matches the title within 'Checklist Details'. I want to pull the 'Event Start Date' from my 'Event Information' list. However, I keep getting the following error.
Please help! I am a beginner with these formulas
Tried both of these and it doesn't work.
I also think the requirements may have confused you.
If the Event Information. ID = Checklist Details. Title then pull the Event Information. Event Start Date for the current ID.
The formula is within a text input box within a gallery.
ok, so the formula should be
Lookup('Event Information', ID = Value(Title)).'Event Start Date'
This again might not work very well with SharePoint lists as both lists have the columns ID and Title.
If that is the case you might have to create a collection and rename some of the columns
ClearCollect(
colEventInformation,
RenameColumns(
'Event Information',
"ID", "EventId",
"Title", "EventTitle"
)
);
Lookup(colEventInformation, EventID = Value(Title)).'Event Start Date'
Exactly, This will pull up the entire record not just the Even start date, for the filter criteria. What we need is a field value, not a record.
The formula should only pull one record from Event Information because Event Information is the parent list whilst Checklist Details is the child list. The formula should be If the Title of the current item matches the ID from the Event Information List, then populate the Event Start Date.
I think the issue is, since you have a one:many relationship, it is giving you an entire table, instead of a particular value for your filter formula. I used a gallery, in my case, to provide all the possible dates that matches the given criteria.
The result of the above filter formula will always be a table and cannot be used within the default property of the 'textinput'.
I am trying to pull the value into a Text Input field within a gallery.
Tried lookup:
Hi @NPatel12498 ,
Maybe can you try using lookup function? Also can you provide more details like are you using a gallery or a text box?
Getting "Expected text value" error now
Hi Can you try Value rather than Text
After trying that, this is what I get:
The datasource is SharePoint. 'Event Information' uses the regular ID and 'Checklist Details' uses Title which has a number but has data type as single line text.
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,962
Most Valuable Professional