Hi All,
i am trying to create a lookup column for a new list i am creating using the http request. I believe i've got most of it setup but im not sure on the json need to all for multiple fields in this case ID and essionDuration.
This is the column i'm trying to replace in flow:
this is how it looks in the flow:
any help is appreciated.
thank you
Solved! Go to Solution.
Hi @arturdjali,
You can use the FieldRef property in two other requests with the same CreateFieldAs Xml method. You can reuse the Id from the output of your first request to reference the lookup field in your second and third request.
Below is an example.
{"parameters":{"__metadata":{"type":"SP.XmlSchemaFieldCreationInformation"},"SchemaXml":"<Field DisplayName='Course: ID' FieldRef='@{body('Send_an_HTTP_request_to_SharePoint')['d']['Id']}' Format='Dropdown' IsModern='TRUE' List='@{variables('LookupListGUID')}' Name='Course: ID' ShowField='ID' Title='Course: ID' Type='Lookup'></Field>"}}
Hi @arturdjali,
You could use the CreateFieldAsXml method for the creation of a lookup field.
Try something like below:
{"parameters":{"__metadata":{"type":"SP.XmlSchemaFieldCreationInformation"},"SchemaXml":"<Field DisplayName='Course' Format='Dropdown' Indexed='FALSE' IsModern='TRUE' IsRelationship='FALSE' List='@{variables('LookupListGUID')}' Name='Course' ShowField='Title' Title='Course' Type='Lookup'></Field>","Options":12}}
Hi @Expiscornovus ,
This works perfectly for creating the lookup column, my only other question what change would i need to make to select columns to show ID and SessionDuration?
Thank you
Hi @arturdjali,
You can use the FieldRef property in two other requests with the same CreateFieldAs Xml method. You can reuse the Id from the output of your first request to reference the lookup field in your second and third request.
Below is an example.
{"parameters":{"__metadata":{"type":"SP.XmlSchemaFieldCreationInformation"},"SchemaXml":"<Field DisplayName='Course: ID' FieldRef='@{body('Send_an_HTTP_request_to_SharePoint')['d']['Id']}' Format='Dropdown' IsModern='TRUE' List='@{variables('LookupListGUID')}' Name='Course: ID' ShowField='ID' Title='Course: ID' Type='Lookup'></Field>"}}
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
70 | |
25 | |
18 | |
16 | |
13 |
User | Count |
---|---|
134 | |
44 | |
32 | |
32 | |
29 |