So i want to create an site and add an Interface as a page in it but it should be read only and i should have fields but the data in those fields must be coming from a record table.
Discussion posts and replies are publicly visible
All input fields have a readOnly parameter.
And you can query the data into a local variable using queryRecordType().
For better suggestions, we need to understand your specific use case and more details.
So in here i want to create a site in which there needs to be an interface page which should be read only and the data in that fields should come from a record table, i mean we enter the data in an interface-1 which is mapped to a record field and then after the data is stored the same data needs to be displayed in the site in the interface-2 as a list.
While this can somehow be built, I strongly suggest to follow the idea of how Appian works.
Create a record first. Then a record action to create a new item, a record summary view to display it, and then use the record list feature to show that list.
Is creating an interface in site not a good practice ?
I mean i just want to create an interface that will show the given data in a list. Is using record table a good practice or interface.
It depends. On the use case, UX considerations, and other requirements.
But, the most simple approach, is to use the OOTB features. The record list as a site page shows existing record and you can create new ones using the record list action. Clicking a record navigates to the record summary view.
This is the basic principles of how it is meant to be done. You can ignore all this and build everything from scratch, but then you will find out that many specific features are designed to specifically support this basic principle. And then you will have a hard to working around this.
I see, thank you very much for sharing your knowledge with me.